HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC - 2013-2014 > problem:


2013-05-30. 50580 - Days passed

IMPC - 2013-2014

Start: Mar.16.2013 at 12:00:00 PM
Finish: Mar.16.2013 at 05:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (3)

Contest problems

• 2013-04-100. 50323 - Filtering Cont...
• 2013-04-30. 50337 - Exam Averages
• 2013-04-40. 50338 - Convert Into ...
• 2013-04-50. 50774 - Hot Potato
• 2013-04-70. 50296 - Total Discount...
• 2013-04-80. 50343 - The number of...
• 2013-04-90. 50332 - Variance of a ...
• 2013-05-10. 50552 - Casual shoes
• 2013-05-30. 50580 - Days passed
• 2013-05-40. 50553 - Divisible by m
• 2013-05-50. 50593 - Transporter
• 2013-12-10. 50352 - Selling Cows
• 2013-12-40. 50342 - 100 Factorial
• 2013-12-50. 50674 - Collecting Eggs
• 2013-Nov-01. 50328 - How far away
• 2013-Nov-02. 50347 - Selling Oranges
• 2013-Nov-05. 50354 - Intersecting ...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

How many days passed?

Shqip

Mr. Yunus has a new baby. While he counts her days, he decided to get a program for this. Later, he wanted to extend this program for all of his family members. He wonders how many days old are his family members? Write a program that is going to take two dates and calculate the number of days passed?

Notes:

  1. You can accept Sunday, January 01, 1900 as day 1.
  2. And thus, you can assume that every year has approximately 365.2496 days
  3. Leap year is calculated as follows:
    • If the year is a multiple of 400, it is a leap year
    • If it's not a multiple of 400 but it is a multiple of 100, it is a not leap year
    • If it's not a multiple of 100 but it is a multiple of 4, it is a leap year
    • Otherwise, it is a not leap year
  4. Above mentioned calculations are based on MS. Excel. In MS. Excel, you can subtract a date from another as in the figure next.

Input specification
You will be given two dates in two lines (date1 and date2). Every date information contains three space separated integers (day month year) where 1900 ≤ year < 2100. And, it's guaranteed that date1 < date2.

Output specification
Give just one number that represents the number of days between the given dates.

 Sample Input I  
  4 5 2013
  29 11 2013
 Sample Output I  
   209
 Sample Input II  
  1 2 1996
  11 5 2013
 Sample Output II  
   6309
 Sample Input III  
  4 11 1936
  29 11 2013
 Sample Output III  
  28149


Для отправки решений необходимо выполнить вход.

www.contester.ru