結果

問題 No.1650 Moving Coins
ユーザー wolgnik
提出日時 2021-08-20 21:43:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 131,616 KB
最終ジャッジ日時 2024-10-14 03:02:03
合計ジャッジ時間 10,251 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 8 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

res = []
for i in range(N):
  x = a[i]
  y = b[i]
  while x != y:
    if x < y:
      res.append((i + 1, "R"))
      x += 1
    else:
      res.append((i + 1, "L"))
      x -= 1

print(len(res))
for r in res: print(*r)
0