結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-12 19:13:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 456 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-24 07:31:33 |
| 合計ジャッジ時間 | 762 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()