結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2016-10-30 00:05:28 |
言語 | C++14 (gcc 11.2.0 + boost 1.78.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 393 ms |
使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2022-12-30 01:07:14 |
合計ジャッジ時間 | 1,094 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,904 KB |
testcase_01 | AC | 10 ms
6,948 KB |
testcase_02 | AC | 10 ms
4,900 KB |
ソースコード
#include <iostream> #include<string> using namespace std; int main() { int n; cin>>n; string s; int a; for(int i=0;i<n;i++) { s=""; cin>>a; a++; while(a!=1) { if(a%2==0)s+="L"; else s+="R"; a/=2; } for(int i=s.length()-1;i>=0;i--)cout<<s[i]; cout<<endl; } return 0; }