Accepted
Code
#include<bits/stdc++.h>
using namespace std;
int main(){
int t; cin >> t;
while(t--){
int n;
cin >> n;
if(n%6 == 0) cout << "RGB";
else if(n%6 == 1) cout << "GRB";
else if(n%6 == 2) cout << "GBR";
else if(n%6 == 3) cout << "BGR";
else if(n%6 == 4) cout << "BRG";
else if(n%6 == 5) cout << "RBG";
cout << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1010 Red Green Blue
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-08-17 05:42:53
- Judged At
- 2024-11-11 03:09:40
- Judged By
- Score
- 100
- Total Time
- 4ms
- Peak Memory
- 532.0 KiB