Fibonacci Clock(初级)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
ACSL’s version of Philippe Chretien’s “Fibonacci Clock” displays time by changing the colors displayed in 5 squares, whose side lengths correspond to the first 5 Fibonacci numbers (1, 1, 2, 3, and 5). Given the colors of the squares on the clock face, you must output the time that is represented in hh:mm format. The colors will be given to you as 5 individual characters representing the lower 1x1 square, the upper 1x1 square, the 2x2 square, the 3x3 square, and the 5x5 square in that order.

Input Format
There are 5 sets of data. Each set has 5 uppercase letters (R, G, B, or W) that represent the colors of the lower 1x1, the upper 1x1, the 2x2, the 3x3, and finally the 5x5 square, in that order. We guarantee that the input will represent a valid time from 00:00 to 11:55.
Output Format
For each line of data, print the time in hours and minutes formatted as hh:mm.
Explanation
Red squares are used to represent only hours and green squares are used to represent only minutes. Blue squares are used to represent both hours and minutes. White squares are ignored. To find the current hour, add the values of the red and blue squares. To find the current minutes, add the values of the green and blue squares and multiply by 5. The minutes are displayed in five-minute increments.
Example:
Input R W G B G displays the time 04:50.
- The hours are represented by the 1x1 red square and the 3x3 blue square: .
- The minutes are represented by the 2x2 green, the 3x3 blue, and the 5x5 green squares: .
Input W B B G R displays the time 08:30.
- The hours are .
- The minutes are .
R W G B G
04:50
W B B G R
08:30
B G B B R
11:35
W W W B B
08:40
W R G G G
01:50
20251206 C班作业(9)
- Status
- Done
- Problem
- 3
- Open Since
- 2025-12-6 0:00
- Deadline
- 2025-12-14 23:59
- Extension
- 24 hour(s)