結果
問題 |
No.1650 Moving Coins
|
ユーザー |
|
提出日時 | 2022-12-13 16:56:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 427 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 110,456 KB |
最終ジャッジ日時 | 2024-11-07 11:50:11 |
合計ジャッジ時間 | 8,336 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 5 TLE * 1 -- * 18 |
ソースコード
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