結果
問題 |
No.392 2分木をたどれ
|
ユーザー |
![]() |
提出日時 | 2025-04-18 17:26:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 265 bytes |
コンパイル時間 | 3,107 ms |
コンパイル使用メモリ | 278,460 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-04-18 17:26:52 |
合計ジャッジ時間 | 3,745 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int m;cin>>m; while(m--){ int n;cin>>n; stack<char>s; while(n){ if(n&1)s.push('L'); else s.push('R'); n=(n-1)/2; }while(!s.empty()){ cout<<s.top();s.pop(); }cout<<'\n'; } return 0; }