Aligned Calendar
Time limit1sMemory limit256 MB
Convert each Gregorian date into the 13-month calendar with 28-day months and report the leftover days as holidays.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
The super-villain calendar has 13 months of 28 days each, covering 364 days. The remaining one or two days of a regular year are holidays. Convert each Gregorian date to the super-villain calendar using the usual leap-year rules.
Input
The first line contains the number of test cases. Each following line has one date in YYYY MM DD format.
Output
For each date, print YYYY/M/D became YYYY/M/D. If the date is a holiday, print YYYY/M/D became a HOLIDAY instead.