4 人解决,7 人已尝试。
4 份提交通过,共有 13 份提交。
8.0 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
Rocky rolled over in his bed and looked at his LED alarm clock. He saw what was displayed and went back to sleep. Later, he woke up again and once again glanced at the alarm clock. Although he did not know if all the LED segments were working, he was able to determine with certainty the time. Could you?
Rocky’s LED clock uses four 7-segment displays to show the time.
Each 7-segment display has seven bars on it, and displays different numbers by turning on different bars:
The first line contains a single integer n indicating the number of data sets.
Each data set is a single line containing eight 7-bit strings representing the LED displays observed. The first four strings will represent the first time displayed and the next four strings will represent the second time displayed. All of the strings will be separated by a single space. Note: It is not given in the input which segments are burnt out.
For each data set, there will be exactly one line of output. This line will simply be the second time observed in the LED display, in the format HH:MM. The segments that are burnt out will be consistent between the first and second time displayed. There will only be one possible solution for each data set.
All times (for input and output) will be represented in standard (non-military) format, with no leading zeros (nine o’clock is 9:00, not 09:00).
2 0110000 1101101 1111110 1111111 0000000 1111011 1111110 1111111 0000000 0000000 1000001 1111111 0100000 0000001 0000000 0110000
9:08 12:11
4 人解决,7 人已尝试。
4 份提交通过,共有 13 份提交。
8.0 EMB 奖励。