Logo
(追記) (追記ここまで)

10194번 - Aligned Calender 다국어

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

문제

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

힌트

출처

School > University of Maryland High School Programming Contest > HSPC 2014 2번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /