結果
問題 | No.392 2分木をたどれ |
ユーザー |
|
提出日時 | 2021-09-13 18:45:42 |
言語 | PyPy3 (7.3.8) |
結果 |
AC
|
実行時間 | 297 ms / 2,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 390 ms |
使用メモリ | 91,688 KB |
最終ジャッジ日時 | 2023-01-24 02:39:16 |
合計ジャッジ時間 | 2,400 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 234 ms
90,276 KB |
testcase_01 | AC | 292 ms
91,408 KB |
testcase_02 | AC | 297 ms
91,688 KB |
ソースコード
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])