結果

問題 No.392 2分木をたどれ
コンテスト
ユーザー fumofumofuni
提出日時 2021-09-13 18:45:42
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 283 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 518 ms
コンパイル使用メモリ 85,384 KB
実行使用メモリ 84,368 KB
最終ジャッジ日時 2026-03-12 04:57:15
合計ジャッジ時間 1,385 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import queue
que=queue.Queue()
que.put(0)
dp=['']*10010
while not que.empty():
    v=que.get()
    if v>=5000:
        continue
    dp[v*2+1]=dp[v]+'L'
    dp[v*2+2]=dp[v]+'R'
    que.put(v*2+1)
    que.put(v*2+2)
N=int(input())
for i in range(N):
    A=int(input())
    print(dp[A])
0