HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50580 - Days passed

Guest
• Review clarifications (3)

Section problems

• 50454 - What day is it?
• 50350 - Fahrenheit to Celsius
• 50356 - Hours Passed
• 50466 - Drawing Square From Stars
• 50351 - Convert inches to cm
• 50467 - Random Numbers
• 50474 - Sum of Two Primes
• 50371 - Modified Karnaugh-Map
• 50580 - Days passed
• 50591 - Leap year
• 50597 - Drawing Diamonds

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