simple rainbow by Vim Lover

#include<iostream>
#define z string
using namespace std;main(){int N;cin>>N;cout<<z(N,32)+z(2*N,82)+'\n'+z(N-1,32)+'R'+z(2*N,71)+"R\n"+z(N-2,32)+"RG"+z(2*N,66)+"GR\n";for(int j=3;j<=N;++j){cout<<z(N-j,32)+"RGB"+z(2*(N+j-3),32)+"BGR\n";}cout<<"GB"+z(4*N-4,32)+"BG\nB"+z(4*N-2,32)+"B";}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page