300803: CF153D. Date Change

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Date Change

题意翻译

给你一个日期,求这个日期加上整数n天之后是哪一天(n为任意整数)。 本题只能用 Kotlin 语言提交。

题目描述

You are given a date in "DD.MM.YYYY" ("day.month.year") format and a number of days $ shift $ you have to add to this date. Output the resulting date.

输入输出格式

输入格式


The first line of input contains the date in "DD.MM.YYYY" format: two digits for day (with leading zero if needed), dot, two digits for month (with leading zero if needed), dot, four digits for year. The notation is guaranteed to give a valid date between 1980 and 2020, inclusive. The second line contains an integer $ shift $ ( $ -1000<=shift<=1000 $ ).

输出格式


Output a date equal to the given one + $ shift $ days, in the same format "DD.MM.YYYY".

输入输出样例

输入样例 #1

10.02.2012
12

输出样例 #1

22.02.2012

输入样例 #2

01.02.2010
-40

输出样例 #2

23.12.2009

输入样例 #3

01.01.2000
365

输出样例 #3

31.12.2000

输入样例 #4

13.08.1990
-609

输出样例 #4

12.12.1988

说明

When manipulating the dates, take into account leap years; don't care about time zones/daylight saving time.

Input

题意翻译

给你一个日期,求这个日期加上整数n天之后是哪一天(n为任意整数)。 本题只能用 Kotlin 语言提交。

加入题单

算法标签: