시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB35222161.765%

문제

The Minions have found that El Macho and other super-villains use a different calendar than the rest of us. Their calendar has 13 months that each have 28 days (thus the 13 months cover a total of 364 days). The remaining 1 or 2 days of the year (depending on whether it is leap year or not) are used as a vacation before starting the next year of evil. The Minions need you to implement a method that will convert a date from the regular calendar into a date on the super-villain calendar.

The Minions have provided you with the following reminders:

  • Non-leap years have the following days per month: 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31.
  • A leap year has 29 days in the second month and is defined as any year that is evenly divisible by 4 as long as that year is NOT evenly divisible by 100 UNLESS that year is also evenly divisible by 400.

Your task is to write a program that will read in a series of dates from the standard calendar and convert them to the super-villain calendar and print the new date. The provided skeleton handles the input of the dates and the output messages.

입력

The first line in the test data file contains the number of test cases (≤ 100). After that each line will contain one date from the regular calendar in “YYYY MM DD” format. You can assume that you will only be provided with correct dates.

출력

For each test case, the program should display the date from the regular calendar and the date as it would appear on the super-villain calendar. The exact format is shown below.

출력 형식

정확한 출력 형식은 제출에서 언어를 Java로 설정하면 확인할 수 있다.

예제 입력 1

4
2014 01 20
2014 01 31
2014 03 30
2014 12 31

예제 출력 1

2014/1/20 became 2014/1/20
2014/1/31 became 2014/2/3
2014/3/30 became 2014/4/5
2014/12/31 became a HOLIDAY