結果

問題 No.1183 コイン遊び
ユーザー kozykozy
提出日時 2020-08-22 14:27:11
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 676 ms / 2,000 ms
コード長 521 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 35,804 KB
最終ジャッジ日時 2023-08-05 11:38:27
合計ジャッジ時間 16,810 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,028 KB
testcase_01 AC 17 ms
8,004 KB
testcase_02 AC 16 ms
8,024 KB
testcase_03 AC 17 ms
7,988 KB
testcase_04 AC 16 ms
8,088 KB
testcase_05 AC 17 ms
7,976 KB
testcase_06 AC 16 ms
7,976 KB
testcase_07 AC 17 ms
7,980 KB
testcase_08 AC 17 ms
7,924 KB
testcase_09 AC 17 ms
8,064 KB
testcase_10 AC 29 ms
8,904 KB
testcase_11 AC 55 ms
9,740 KB
testcase_12 AC 396 ms
25,752 KB
testcase_13 AC 353 ms
22,476 KB
testcase_14 AC 624 ms
32,068 KB
testcase_15 AC 635 ms
35,680 KB
testcase_16 AC 636 ms
35,344 KB
testcase_17 AC 667 ms
35,792 KB
testcase_18 AC 676 ms
35,684 KB
testcase_19 AC 627 ms
35,148 KB
testcase_20 AC 635 ms
34,228 KB
testcase_21 AC 626 ms
34,280 KB
testcase_22 AC 593 ms
35,800 KB
testcase_23 AC 593 ms
34,172 KB
testcase_24 AC 647 ms
34,104 KB
testcase_25 AC 629 ms
35,384 KB
testcase_26 AC 638 ms
34,548 KB
testcase_27 AC 627 ms
34,156 KB
testcase_28 AC 624 ms
35,804 KB
testcase_29 AC 582 ms
33,840 KB
testcase_30 AC 628 ms
34,288 KB
testcase_31 AC 633 ms
35,656 KB
testcase_32 AC 631 ms
35,744 KB
testcase_33 AC 623 ms
34,588 KB
testcase_34 AC 666 ms
34,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0