結果

問題 No.392 2分木をたどれ
ユーザー 👑 yumechiyumechi
提出日時 2016-09-09 00:40:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 1,741 ms
コンパイル使用メモリ 87,000 KB
実行使用メモリ 77,456 KB
最終ジャッジ日時 2023-08-10 00:19:14
合計ジャッジ時間 1,170 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,340 KB
testcase_01 AC 106 ms
77,412 KB
testcase_02 AC 102 ms
77,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    for _ in range(int(input())):
        i = int(input())
        res = ""
        while i > 0:
            if i % 2 == 0:
                i -= 1
                res += "R"
            else:
                res += "L"
            i >>= 1
        print(res[::-1])


if __name__=="__main__":
    solve()
0