結果

問題 No.2228 Creeping Ghost
ユーザー maron8676
提出日時 2023-02-24 22:46:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 464 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 81,912 KB
実行使用メモリ 141,544 KB
最終ジャッジ日時 2024-09-13 05:52:55
合計ジャッジ時間 1,926 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, deque
from sys import stdin

readline = stdin.readline


def li():
    return list(map(int, readline().split()))


first_steps = 'RRRDDDDL'
loop_steps = 'LLUUUURRRRDDDDLL'
T = int(input())

ans = []
for i in range(T):
    if i < len(first_steps):
        ans.append(first_steps[i])
    else:
        index = i - len(first_steps)
        index = index % len(loop_steps)
        ans.append(loop_steps[index])
print(''.join(ans))
0