結果

問題 No.1183 コイン遊び
ユーザー kozykozy
提出日時 2020-08-22 14:27:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 680 ms / 2,000 ms
コード長 521 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 40,136 KB
最終ジャッジ日時 2024-04-23 08:48:36
合計ジャッジ時間 16,563 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 25 ms
10,880 KB
testcase_04 AC 26 ms
10,880 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 AC 27 ms
10,880 KB
testcase_07 AC 25 ms
10,752 KB
testcase_08 AC 26 ms
10,880 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 37 ms
11,264 KB
testcase_11 AC 61 ms
12,544 KB
testcase_12 AC 412 ms
29,236 KB
testcase_13 AC 375 ms
26,852 KB
testcase_14 AC 595 ms
34,504 KB
testcase_15 AC 650 ms
40,136 KB
testcase_16 AC 633 ms
38,532 KB
testcase_17 AC 640 ms
38,576 KB
testcase_18 AC 654 ms
38,440 KB
testcase_19 AC 651 ms
37,300 KB
testcase_20 AC 654 ms
39,856 KB
testcase_21 AC 609 ms
38,376 KB
testcase_22 AC 596 ms
37,092 KB
testcase_23 AC 614 ms
37,220 KB
testcase_24 AC 615 ms
37,088 KB
testcase_25 AC 655 ms
38,912 KB
testcase_26 AC 642 ms
38,244 KB
testcase_27 AC 651 ms
38,712 KB
testcase_28 AC 661 ms
39,044 KB
testcase_29 AC 606 ms
38,892 KB
testcase_30 AC 669 ms
37,220 KB
testcase_31 AC 656 ms
37,560 KB
testcase_32 AC 645 ms
38,248 KB
testcase_33 AC 644 ms
38,196 KB
testcase_34 AC 680 ms
40,104 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