#C364. Traffic Light Simulator
Traffic Light Simulator
Traffic Light Simulator
You are given the number of seconds T since a traffic light last turned green. The traffic light follows a fixed cycle of 120 seconds composed of three phases:
- Green for the first 60 seconds.
- Yellow for the next 5 seconds (i.e. from 60 to 64 seconds).
- Red for the remaining 55 seconds (i.e. from 65 to 119 seconds).
After 120 seconds, the cycle repeats. Formally, if we let \(T_{mod} = T \mod 120\), then the state is determined as:
- Green if \(T_{mod} < 60\).
- Yellow if \(60 \leq T_{mod} < 65\).
- Red if \(65 \leq T_{mod} < 120\).
Your task is to output the current traffic light state for a provided time T.
Note: Your solution should read input from standard input (stdin) and write the result to standard output (stdout).
inputFormat
The input consists of a single integer T on a line by itself (\(0 \leq T \leq 10^9\)), representing the total number of seconds passed since the last time the light turned green.
outputFormat
Output a single string representing the current state of the traffic light. Possible outputs are "Green", "Yellow", or "Red".
## sample0
Green