/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 2ms 324.0 KiB
#3 Accepted 4ms 324.0 KiB
#4 Accepted 4ms 420.0 KiB
#5 Accepted 4ms 532.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-11-11 03:09:40
Judged By
Score
100
Total Time
4ms
Peak Memory
532.0 KiB