結果

問題 No.392 2分木をたどれ
ユーザー KKT89
提出日時 2020-10-14 21:00:45
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 1,896 ms
コンパイル使用メモリ 193,276 KB
最終ジャッジ日時 2025-01-15 07:18:36
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int q; cin >> q;
    while(q--){
        int a; cin >> a; a++;
        string s="";
        while(a){
            if(a%2)s+="R";
            else s+="L";
            a/=2;
        }
        s.pop_back();
        reverse(s.begin(), s.end());
        cout << s << "\n";
    }
}
0