| 比赛 | cmath生日赛 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | RGB灯泡 | 最终得分 | 100 |
| 用户昵称 | CSU_Turkey | 运行时间 | 0.032 s |
| 代码语言 | C++ | 内存使用 | 13.92 MiB |
| 提交时间 | 2017-06-13 19:27:48 | ||
#include<bits/stdc++.h>
using namespace std;
long long n,m;
int main()
{
freopen("lightt.in","r",stdin);
freopen("lightt.out","w",stdout);
scanf("%d%lld",&n,&m);
int a[100005];
memset(a,0,sizeof(a));
int h=0;
while(m)
{
a[++h]=m%3;
m/=3;
}
for(int i=n;i>=1;i--)
{
if(a[i]==1)cout<<"G";
if(a[i]==2)cout<<"B";
if(a[i]==0)cout<<"R";
}
return 0;
}