시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB62425021138.930%

문제

A mobile cell service provider in Ottawa broadcasts an automated time standard to its mobile users that reflects the local time at the user’s actual location in Canada. This ensures that text messages have a valid local time attached to them.

For example, when it is 1420 in Ottawa on Tuesday February 24, 2009 (specified using military, 24 hour format), the times across the country are shown in the table below:

Pacific Time Victoria, BC Tuesday 2/24/2009 1120 PST
Mountain Time Edmonton, AB Tuesday 2/24/2009 1220 MST
Central Time Winnipeg, MB Tuesday 2/24/2009 1320 CST
Eastern Time Toronto, ON Tuesday 2/24/2009 1420 EST
Atlantic Time Halifax, NS Tuesday 2/24/2009 1520 AST
Newfoundland Time St. John’s, NL Tuesday 2/24/2009 1550 Newfoundland ST

Write a program that accepts the time in Ottawa in 24 hour format and outputs the local time in each of the cities listed above including Ottawa. You should assume that the input time will be valid (i.e., an integer between 0 and 2359 with the last two digits being between 00 and 59).

You should note that 2359 is one minute to midnight, midnight is 0, and 13 minutes after midnight is 13. You do not need to print leading zeros, and input will not contain any extra leading zeros.

예제 입력 1

1300

예제 출력 1

1300 in Ottawa
1000 in Victoria
1100 in Edmonton
1200 in Winnipeg
1300 in Toronto
1400 in Halifax
1430 in St. John's

출처

Olympiad > Canadian Computing Competition & Olympiad > 2009 > CCC 2009 Junior Division 3번

  • 데이터를 추가한 사람: YunGoon