/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 1ms 516.0 KiB
#3 Accepted 1ms 396.0 KiB
#4 Accepted 1ms 508.0 KiB
#5 Accepted 1ms 532.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
using namespace chrono;

vector<string> strings{
        "RGB",
        "GRB",
        "GBR",
        "BGR",
        "BRG",
        "RBG"
};

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int t; cin >> t; while (t--) {
        int k; cin >> k;
        cout << strings[k % 6] << "\n";
    }
}

Information

Submit By
Type
Submission
Problem
P1010 B. Red Green Blue
Language
C++17 (G++ 13.2.0)
Submit At
2025-07-14 18:18:12
Judged At
2025-07-14 18:18:12
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB