結果

問題 No.1650 Moving Coins
ユーザー siro53siro53
提出日時 2021-08-21 03:08:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 123,528 KB
最終ジャッジ日時 2024-04-22 12:23:13
合計ジャッジ時間 7,996 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,228 KB
testcase_01 AC 35 ms
52,240 KB
testcase_02 AC 34 ms
52,916 KB
testcase_03 AC 115 ms
77,124 KB
testcase_04 AC 111 ms
77,096 KB
testcase_05 AC 111 ms
76,924 KB
testcase_06 AC 126 ms
77,868 KB
testcase_07 AC 123 ms
77,372 KB
testcase_08 AC 173 ms
103,436 KB
testcase_09 AC 154 ms
103,596 KB
testcase_10 AC 165 ms
103,684 KB
testcase_11 AC 200 ms
103,692 KB
testcase_12 AC 169 ms
94,796 KB
testcase_13 AC 166 ms
94,944 KB
testcase_14 AC 188 ms
102,960 KB
testcase_15 AC 153 ms
89,988 KB
testcase_16 AC 195 ms
106,112 KB
testcase_17 AC 190 ms
104,520 KB
testcase_18 AC 198 ms
108,296 KB
testcase_19 AC 183 ms
123,128 KB
testcase_20 AC 190 ms
123,528 KB
testcase_21 AC 196 ms
123,156 KB
testcase_22 AC 191 ms
122,516 KB
testcase_23 AC 191 ms
122,496 KB
testcase_24 AC 95 ms
77,112 KB
testcase_25 AC 110 ms
76,928 KB
testcase_26 AC 121 ms
122,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
M = sum([abs(a - b) for (a, b) in zip(A, B)])
print(M)
for i in range(N)[::-1]:
    if A[i] <= B[i]:
        for _ in range(B[i] - A[i]):
            print(i+1, 'R')
for i in range(N):
    if A[i] > B[i]:
        for _ in range(A[i] - B[i]):
            print(i+1, 'L')
0