A. 交通灯 / Traffic Light

    传统题 1000ms 256MiB

交通灯 / Traffic Light

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

The color of a certain traffic light changes periodically in the order B (blue), Y (yellow), R (red), B (blue), Y (yellow), R (red), …\dots.

You are given a character cc representing the current color of the traffic light. Output the next color of the traffic light.

Constraints

  • cc is one of B, Y, and R.

Input

The input is given from Standard Input in the following format:

  • cc

Output

Output the character representing the next color of the traffic light.

B
Y

The color after B (blue) is Y (yellow). Thus, output Y.

R
B

The color after red is blue.

Y
R

ABC477 赛后模拟赛 ✅️

未参加
状态
已结束
规则
IOI
题目
7
开始于
2026-9-26 21:40
结束于
2026-10-10 21:40
持续时间
336 小时
主持人
参赛人数
49