結果

問題 No.1650 Moving Coins
ユーザー ch1channnch1channn
提出日時 2022-12-13 16:56:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 109,056 KB
最終ジャッジ日時 2024-04-25 02:18:10
合計ジャッジ時間 7,810 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 36 ms
51,840 KB
testcase_02 AC 34 ms
51,712 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
if sys.platform =='ios':
	import clipboard
	a=clipboard.get()
	a = a.split('\n')
	text = '\n'.join(a)
	with open('input_file.txt','w') as f:
		f.write(text)
	sys.stdin = open('input_file.txt')
	
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
cnt = 0
for i in range(n):
	cnt += abs(a[i]-b[i])
print(cnt)
i = 0
while a != b:
	if a[i] != b[i]:
		if a[i] < b[i]:
			a[i] += 1
			print(i+1,"R")
		else:
			print(i+1,"L")
			a[i] -= 1
	else:
		i += 1
0