| 记录编号 | 453035 | 评测结果 | AAAAAAAAAA | 
    
        | 题目名称 | 2595.RGB灯泡 | 最终得分 | 100 | 
    
        | 用户昵称 |  JustWB | 是否通过 | 通过 | 
    
        | 代码语言 | C++ | 运行时间 | 0.010 s | 
    
        | 提交时间 | 2017-09-20 20:23:59 | 内存使用 | 0.70 MiB | 
    
    
    
    		显示代码纯文本
		
		#include<cstdio>
#include<iostream>
const int maxn=1e5+5;
using namespace std;
inline long long get();
int N[maxn];
long long n,m;
int main()
{
	freopen("lightt.in","r",stdin);
	freopen("lightt.out","w",stdout);
	n=get(),m=get();
	for(int i=n;i>=1;i--)
	{
		if(!m)break;
		N[i]=m%3;
		m/=3;
	}
	for(int i=1;i<=n;i++)
	{
		if(!N[i])printf("R");
		else if(N[i]==1)printf("G");
		else printf("B");
	}
	return 0;
}
inline long long get()
{
	long long t=0;char c=getchar(),j=1;
	while(!isdigit(c))
		if(c=='-')j=-1,c=getchar();
		else c=getchar();
	while(isdigit(c))
		t=(t<<3)+(t<<1)+c-'0',
		c=getchar();
	return j*t;
}