結果
問題 |
No.1183 コイン遊び
|
ユーザー |
|
提出日時 | 2020-08-22 13:18:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 367 ms / 2,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 82,196 KB |
実行使用メモリ | 269,972 KB |
最終ジャッジ日時 | 2024-10-15 07:31:20 |
合計ジャッジ時間 | 10,253 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) N = int(input()) As = list(mapint())+[-1] Bs = list(mapint())+[-1] cnt = 0 ans = 0 for i in range(N+1): if As[i]==Bs[i]: if cnt>0: ans += 1 cnt = 0 else: cnt += 1 print(ans)