結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2020-03-21 12:04:28 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 1,988 ms |
コンパイル使用メモリ | 199,836 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-08-23 10:33:20 |
合計ジャッジ時間 | 2,505 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 3 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 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'; } }