| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 19 | 11 | 7 | 87.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:
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.
3 1000 January 1, 1999 365 August 12, 2034 712 December 31, 1991
September 26, 1999 February 17, 2035 July 09, 1992