78B.md (1413B)
1 Source: https://codeforces.com/problemset/problem/78/B 2 3 B. Easter Eggs 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 The Easter Rabbit laid *n* eggs in a circle and is about to paint them. 22 23 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: 24 25 * Each of the seven colors should be used to paint at least one egg. 26 * Any four eggs lying sequentially should be painted different colors. 27 28 Help the Easter Rabbit paint the eggs in the required manner. We know that it is always possible. 29 30 Input 31 32 The only line contains an integer *n* — the amount of eggs (7 ≤ *n* ≤ 100). 33 34 Output 35 36 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. 37 38 If there are several answers, print any of them. 39 40 Examples 41 42 Input 43 44 ``` 45 8 46 ``` 47 48 Output 49 50 ``` 51 ROYGRBIV 52 ``` 53 54 Input 55 56 ``` 57 13 58 ``` 59 60 Output 61 62 ``` 63 ROYGBIVGBIVYG 64 ``` 65 66 Note 67 68 The way the eggs will be painted in the first sample is shown on the picture: 69 70 