/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 532.0 KiB
#4 Accepted 1ms 764.0 KiB
#5 Accepted 1ms 404.0 KiB

Code

#include<bits/stdc++.h>
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define ll long long int
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define mx_ele(v) *max_element(v.begin(),v.end())
#define mnm_ele(v) *min_element(v.begin(),v.end())
#define endl "\n"
using namespace std;
void smile()
{
    int n;cin>>n;
    int rem=n%6;
    if(rem==0)
    cout<<"RGB"<<endl;
    else if(rem==1)
    cout<<"GRB\n";
    else if(rem==2)
    cout<<"GBR\n";
    else if(rem==3)
    cout<<"BGR\n";
    else if(rem==4)
    cout<<"BRG\n";
    else if(rem==5)
    cout<<"RBG\n";
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int T=1;
    cin>>T;
    while(T--)
    {
        smile();
    }

}
    

Information

Submit By
Type
Submission
Problem
P1010 Red Green Blue
Contest
Brain booster - 1
Language
C++17 (G++ 13.2.0)
Submit At
2023-12-31 15:27:14
Judged At
2024-11-11 03:45:43
Judged By
Score
100
Total Time
1ms
Peak Memory
764.0 KiB