結果
| 問題 | No.392 2分木をたどれ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-12 19:13:05 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 103 ms / 2,000 ms |
| + 686µs | |
| コード長 | 456 bytes |
| 記録 | |
| コンパイル時間 | 302 ms |
| コンパイル使用メモリ | 21,460 KB |
| 実行使用メモリ | 15,660 KB |
| 最終ジャッジ日時 | 2026-09-03 03:06:47 |
| 合計ジャッジ時間 | 1,697 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write
def main():
M = int(input())
A = [int(input()) for _ in [0] * M]
for ai in A:
ans = ''
while ai > 0:
if ai % 2:
ans += 'L'
ai = (ai * 2 + 1) // 4
else:
ans += 'R'
ai = (ai * 2 - 1) // 4
ans = ans[::-1]
write(ans + '\n')
main()