What day is it?

Report a typo

Today the whole world uses the Coordinated Universal Time (UTC) to distinguish between the time zones. The UTC is considered to be the 0, and the rest of the time zones are expressed using positive or negative offsets from the UTC. For instance, London is in the zone UTC+00:00 (or GMT) and Moscow is in the zone UTC+3:00.

There are 14 positive offsets (from UTC+1:00 to UTC+14:00) and 12 negative offsets (from UTC-12:00 to UTC-1:00). This also means that at a particular hour, three calendar days are observed on the planet. For example, if now it's Sunday, 11:30 in the morning in London, then in the time zone with +14:00 offset people are already living in the "next day", Monday, because their time is 14 hours ahead of London.

Your task is stated as follows:

  • the reference time point is Tuesday, 10:30 in the morning in London (UTC+00:00)

  • read the input string containing the number and the sign of this number (for example, +4, -10). Note, however, that there will be no sign if the number is 0. The number is always an integer. This number is the offset for some time zone.

  • your program should calculate the day and time in the time zone for which you were given the offset.

  • then your program should print the day of the week in the given time zone.

For example, if the input is -11, then, relatively to London, it's 23.30 Monday in this time zone, so your program should print Monday. If the input is +3, then it's 13.30 Tuesday, then your program should print Tuesday, and so on.

The input format:

The value of offset with the sign (e.g. +3 or -9).

The output format:

The day of the week in that timezone.

Sample Input 1:

0

Sample Output 1:

Tuesday

Sample Input 2:

-11

Sample Output 2:

Monday
Write a program in Python 3





___

Create a free account to access the full topic