Skip to content

Instantly share code, notes, and snippets.

@KhaledElshamy
Created January 19, 2017 18:37
Show Gist options
  • Select an option

  • Save KhaledElshamy/7f2446aa04bbcb1a23256e30bd603d20 to your computer and use it in GitHub Desktop.

Select an option

Save KhaledElshamy/7f2446aa04bbcb1a23256e30bd603d20 to your computer and use it in GitHub Desktop.
B. Easter Eggs-codeforces
// working.cpp by Bill Weinman <http://bw.org/>
#include <bits/stdc++.h>
using namespace std;
int main() {
string a="GBIV"; string b; int n;
cin>>n;
if (n<7)
cout<<"Wrong!";
else cout<<"ROYGBIV";
n=n-7;
for (int i=1;i<=n/4;i++)
cout<<a;
n=n%4;
b="";
for (int i=0;i<n;i++)
b=b+a[i];
cout<<b;
return 0;
}
@Moh20All

Moh20All commented Mar 3, 2023

Copy link
Copy Markdown

mrebeb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment