結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2020-03-21 12:04:28 |
言語 | C++17 (gcc 11.2.0 + boost 1.78.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 1,861 ms |
使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2023-01-10 23:40:47 |
合計ジャッジ時間 | 2,616 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,904 KB |
testcase_01 | AC | 2 ms
6,948 KB |
testcase_02 | AC | 2 ms
4,904 KB |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint q;std::cin>>q; while(q--){ lint x;std::cin>>x; std::string ans; while(x){ ans.push_back(x%2?'L':'R'); x=(x-1)/2; } std::cout<<std::string(ans.rbegin(),ans.rend())<<'\n'; } }