CF78B.Easter Eggs
普及-
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
The Easter Rabbit laid n eggs in a circle and is about to paint them.
Each egg should be painted one color out of 7: red, orange, yellow, green, blue, indigo or violet. Also, the following conditions should be satisfied:
- Each of the seven colors should be used to paint at least one egg.
- Any four eggs lying sequentially should be painted different colors.
Help the Easter Rabbit paint the eggs in the required manner. We know that it is always possible.
复活节兔子将 n 枚鸡蛋排成一个圆圈,并准备给它们涂色。
每枚鸡蛋需涂上以下 7 种颜色之一:红色(red)、橙色(orange)、黄色(yellow)、绿色(green)、蓝色(blue)、靛蓝色(indigo)或紫罗兰色(violet)。此外,还需满足以下条件:
- 这七种颜色中的每一种都至少用于涂一枚鸡蛋;
- 任意四枚连续摆放的鸡蛋必须涂上互不相同的颜色。
请帮助复活节兔子按上述要求为鸡蛋涂色。已知这样的涂色方案总是存在的。
输入格式
The only line contains an integer n — the amount of eggs (7 ≤ n ≤ 100).
唯一一行包含一个整数 n —— 鸡蛋的数量(7 ≤ n ≤ 100)。
输出格式
Print one line consisting of n characters. The i-th character should describe the color of the i-th egg in the order they lie in the circle. The colors should be represented as follows: "R" stands for red, "O" stands for orange, "Y" stands for yellow, "G" stands for green, "B" stands for blue, "I" stands for indigo, "V" stands for violet.
If there are several answers, print any of them.
输出一行,包含 n 个字符。其中第 i 个字符应表示圆圈中从左到右第 i 个鸡蛋的颜色。颜色的表示方式如下:“R” 表示红色,“O” 表示橙色,“Y” 表示黄色,“G” 表示绿色,“B” 表示蓝色,“I” 表示靛蓝色,“V” 表示紫罗兰色。
如果存在多个正确答案,输出任意一个即可。
输入输出样例
输入#1
8
输出#1
ROYGRBIV
输入#2
13
输出#2
ROYGBIVGBIVYG
说明/提示
The way the eggs will be painted in the first sample is shown on the picture:

第一个样例中鸡蛋的涂色方式如图所示:

输入解题思路,AI测评打分。不知道怎么写?