#C1164. Traffic Light Timing
Traffic Light Timing
Traffic Light Timing
In this problem, you are asked to determine the state of a traffic light based on a given elapsed time in seconds. The traffic light operates on a 60-second cycle. Let ( t ) be the time in seconds and define ( r = t \mod 60 ). The light sequence is as follows:
- If ( 0 \leq r < 30 ), the light is Red.
- If ( 30 \leq r < 50 ), the light is Green.
- If ( 50 \leq r < 60 ), the light is Yellow.
Your task is to write a program that reads an integer from standard input and outputs the corresponding state of the traffic light to standard output.
inputFormat
The input consists of a single integer ( t ) (( 0 \leq t \leq 10^9 )) representing the elapsed time in seconds.
outputFormat
Output the state of the traffic light, which will be one of the following strings: "Red", "Green", or "Yellow".## sample
45
Green