結果

問題 No.392 2分木をたどれ
ユーザー furafura
提出日時 2020-04-28 16:55:32
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 1,938 ms
コンパイル使用メモリ 197,932 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-16 11:17:57
合計ジャッジ時間 2,690 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 8 ms
4,376 KB
testcase_02 AC 8 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int q; scanf("%d",&q);
	rep(_,q){
		int x; cin>>x; x++;
		string s;
		for(;x!=1;x>>=1) s+=((x&1)==0?'L':'R');
		reverse(s.begin(),s.end());
		cout<<s<<'\n';
	}
	return 0;
}
0