Time Zone
Time limit1sMemory limit256 MB
Given a time in Beijing (UTC+8) and a target time zone string, print the corresponding 24-hour clock time.
- Level
Easy3 of 10
- Topics
- Implementation, Math, String, Simulation
- Solved
- No attempts yet
Problem
Chiaki often participates in international competitive programming contests. The time zone becomes a big problem.
Given a time in Beijing time (UTC +8), Chiaki would like to know the time in another time zone .
Input
There are multiple test cases. The first line of input contains an integer (), indicating the number of test cases. For each test case:
The first line contains two integers , () and a string in the format of UTC+X, UTC-X, UTC+X.Y, or UTC-X.Y ().
Output
For each test, output the time in the format of (24-hour clock).