EasterEggs(15)-B class

 avatar
jackoup
c_cpp
16 days ago
435 B
0
Indexable
Never
CodeForces
#include <iostream>

using namespace std;
void fio() {
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
}

int main() {
    fio();
    int n;cin>>n;
    string colors = "ROYGBIV";
    if(n == 7){
        cout<< colors;
        return 0;
    }
    int index = 0;
    for(int i =0;i<n;i++,index++) {
        cout<<colors[index];
        if(index == 6){
            index = 2;
        }
    }
    return 0;
}
Leave a Comment