#C9357. Meeting Time Conversion to UTC
Meeting Time Conversion to UTC
Meeting Time Conversion to UTC
You are given a list of meeting times with their respective timezone offsets. The task is to convert each meeting time to Coordinated Universal Time (UTC). The meeting time and the timezone offset are given in the format HH:MM and ±HH:MM respectively.
For each meeting, the UTC time is calculated using the formula:
\( \text{UTC minutes} = (\text{Local time in minutes} - \text{Offset in minutes}) \mod (24 \times 60) \)
Output the UTC time for each meeting in the format HH:MM.
Note: The modulo operation ensures that time wraps around midnight correctly.
inputFormat
The input consists of multiple lines:
- The first line contains an integer T indicating the number of meetings.
- The following T lines each contain a meeting time and a timezone offset separated by a space. The time is provided in the format HH:MM and the timezone offset in the format ±HH:MM.
outputFormat
Output T lines, each containing the meeting time converted to UTC in HH:MM format.
## sample3
09:30 +02:00
14:45 -03:00
23:10 +05:30
07:30
17:45
17:40
</p>