/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 1ms 324.0 KiB
#3 Accepted 3ms 344.0 KiB
#4 Accepted 3ms 532.0 KiB
#5 Accepted 10ms 492.0 KiB

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-08-17 05:42:53
Judged By
Score
100
Total Time
10ms
Peak Memory
532.0 KiB