Necroposting

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

The DMOJ admins are trying to stop necroposting, that is, the act of posting to a long inactive discussion thread (on a forum).

The DMOJ admins want to gather some data on necroposting, so they have tasked you to look at some comment threads. You are given a comment and the date of its reply, and are tasked with finding the number of days that have elapsed between the two.

Input Specification

The first line of input will contain a date in the form YYYY/MM/DD.
The second line of input will contain a second date in the same form.

You may assume that the second date will always come after the first, and that all dates are in the Gregorian calendar. Additionally, you may assume that all dates come after 0 CE.

Output Specification

A single non-negative integer, the time difference between the two dates, in days.

Sample Input

2018/02/08
2020/07/26

Sample Output

899

Note about Sample Output

That's clearly a necropost.

Trivia

The "longest year in human history" was 46 BCE, as Julius Caesar realigned the Roman calendar to the Julian calendar.


Comments


  • -1
    Redstone_ray  commented on July 31, 2020, 10:01 p.m.

    Solution written in python shouldn't worth 5 points...


    • -3
      c  commented on July 31, 2020, 11:41 p.m.

      Wait till you see bf4...


      • 0
        Aaeria  commented on Aug. 28, 2021, 9:57 p.m.

        doesn't c++ also have built in string finding