#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string.h>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<set>
#include<vector>
using namespace std;
typedef long long int ll;
const int maxn =1e5+5;
const int maxm=10000;
const int mod =1e9+7;
const int INF=0x3f3f3f3f;
const double eps=1e-8;
int main()
{
int n;scanf("%d",&n);
stack<char>s;
while(n)
{
if(n&1)
{
s.push('N');
n=(n-1)/2;
}
else
{
s.push('G');
n=(n-2)/2;
}
}
while(!s.empty())
{
printf("%c",s.top());
s.pop();
}
return 0;
}
2017Nowcoder Girl初赛重现赛 B 勇气获得机
猜你喜欢
转载自blog.csdn.net/wzazzy/article/details/84866206
今日推荐
周排行