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

26569번 - Seasons 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB1911787.500%

문제

Marie is travelling on a long journey to a far away land by foot. She moves at different speeds at different times of the year due to different weather patterns. More specifically, she can move 3 miles a day during the hot season of January through April, 5 miles a day during the warm season of May through August, and 1 mile per day during the cold season of September through December. Given a starting date, and the distance Marie must travel, calculate when Marie will reach her destination.

입력

The first line of input will contain a single integer n that indicates the number of datasets to follow.

Each dataset will be composed of:

  • An integer d between 1 and 12000, which is the distance Marie must travel.
  • A date in the format “m d, y”, where m, d, and y are the month, day of the month, and year, respectively, on which Marie begins her journey. All dates will be valid.

출력

Output the valid date that Marie will arrive at her far away destination in the format “m d, y”, where m, d, and y are the month, day of the month, and year, respectively.

제한

예제 입력 1

3
1000
January 1, 1999
365
August 12, 2034
712
December 31, 1991

예제 출력 1

September 26, 1999
February 17, 2035
July 09, 1992

힌트

출처

School > PLU High School Programming Contest > PLU 2019 > Advanced 7번

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

출처

대학교 대회

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

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