You are chained to a chair. Underneath you is a huge volcano. A 12-hour clock next to you ticks ominously, and you see that it has wires leading from the back up to a chain, which will drop you into the center of the earth. Taped to the clock is a note:
Each clock hand has an electrode. When both clock hands are in the same position, the power flows and you die. That is, unless you can tell me the exact time that this will occur, to the nearest minute.
You have a computer that knows every programming language. You need to create the shortest (this is code-golf, and standard loopholes are prohibited) program you can, and tell the evil scientist what the time will be. Your program should take input (in any method), consisting of the hour and minute. It should return the next hour and minute (in any method) that this occurs.
According to the OEIS page, the eleven overlap times are:
00:00:00 plus 0/11 s, 01:05:27 plus 3/11 s,
02:10:54 plus 6/11 s, 03:16:21 plus 9/11 s,
04:21:49 plus 1/11 s, 05:27:16 plus 4/11 s,
06:32:43 plus 7/11 s, 07:38:10 plus 10/11 s,
08:43:38 plus 2/11 s, 09:49:05 plus 5/11 s,
10:54:32 plus 8/11 s.
The next time would be 12:00:00. The seconds and their fractional parts are not needed for this challenge. Simply round to the nearest minute.
Test cases:
0:00 (Or 12:00) > 1:05
1:00 > 1:05
11:56 > 12:00 (Or 0:00)
6:45 > 7:38
5:00 > 5:27
6:30 > 6:33 (round up)
The program can be a function, or full program. I do not care if you choose 0:00
or 12:00
, and both are acceptable. Good luck!