hewmatt10's Advent Calendar

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Problem type

hewmatt10 is preparing for Christmas by spreading joy and festivities to all his friends. To do this, he will make an advent calendar for the coming Christmas. hewmatt10 wants to make his advent calendar special, so he plans to make it as long as the number of days until the soonest Christmas. hewmatt10 needs to buy materials for his calendar, and wants to know how many days long his calendar should be. Can you help him out?

hewmatt10 is also feeling very generous and bought you a book about leap years for Christmas. It reads:

A non-leap year is a called a common year. A year is a common year if:

  1. It is not divisible by 4.
  2. It is divisible by 100 and not by 400.
  3. All other years are leap years.

Input Specification

The first line will contain 3 integers in the format [year] [month] [date], today's date. The year will be a positive integer between 1000 and 3000, inclusive.

Output Specification

The number of days until Christmas.


Subtask 1 [30%]

The advent calendar will not include leap years.

Subtask 2 [70%]

No further constraints.

Sample Input

2021 02 14

Sample Output



There are no comments at the moment.