結果
問題 | No.1183 コイン遊び |
ユーザー |
![]() |
提出日時 | 2020-08-22 14:27:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 747 ms / 2,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 40,012 KB |
最終ジャッジ日時 | 2024-10-15 08:43:31 |
合計ジャッジ時間 | 18,194 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
import sys import math sys.setrecursionlimit(10 ** 7) def input() : return sys.stdin.readline().strip() def INT() : return int(input()) def MAP() : return map(int,input().split()) def LIST() : return list(MAP()) def NIJIGEN(H): return [list(input()) for i in range(H)] N=int(input()) L=list(map(int,input().split())) R=list(map(int,input().split())) ans=0 p=1 for i in range(N): if L[i]==R[i] and p==0: ans+=1 p=1 elif L[i]!=R[i] and p==1: p=0 if L[-1]==R[-1]: ans-=1 print(ans+1)