407100: GYM102697 071 Days between two Dates

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

Description

071. Days between two Datestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

In a previous contest, a question was asked about determining how many days apart two dates were, ignoring leap years. This question is essentially the same, except it includes leap years. In addition, this question only asks for the count of days from $$$date 1$$$ to $$$date 2$$$, and $$$date 2$$$ will always be after $$$date 1$$$. Take in two dates in the form of month-name day-number, year. Then print out the number of days from the first date to the second one, and make sure that your calculation includes the addition of days added by leap years.

Input

The first line contains the first date in the form of month day, year. The month is provided as a capitalized name, and not a number. The second line contains the second date in the same form.

Output

A single integer representing the number of days from the first date to the second.

ExampleInput
June 21, 2019
June 21, 2020
Output
366
Note

The second date will always be after the first. Make sure to consider leap years. If you have difficulty with the input, be sure to carefully follow the formatting.

加入题单

算法标签: