結果

問題 No.392 2分木をたどれ
ユーザー btkbtk
提出日時 2016-07-12 00:50:33
言語 C++14
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 1,365 ms
使用メモリ 3,372 KB
最終ジャッジ日時 2022-12-08 16:45:03
合計ジャッジ時間 2,089 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int T;
    cin>>T;
    while(T--){
	int A;
	cin>>A;
	string res;
	while(A){
	    if(A&1)res+="L";
	    else res+="R";
	    A--;
	    A/=2;
	}
	reverse(res.begin(),res.end());
	cout<<res<<endl;

    }
    return 0;
}
0