結果

問題 No.1183 コイン遊び
ユーザー tomatoma
提出日時 2020-08-22 15:03:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 861 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 36,284 KB
最終ジャッジ日時 2024-04-23 09:26:44
合計ジャッジ時間 20,622 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,624 KB
testcase_01 AC 28 ms
10,624 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 25 ms
10,624 KB
testcase_05 AC 25 ms
10,624 KB
testcase_06 AC 26 ms
10,624 KB
testcase_07 AC 26 ms
10,624 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 27 ms
10,752 KB
testcase_10 AC 42 ms
11,264 KB
testcase_11 AC 76 ms
12,236 KB
testcase_12 AC 527 ms
26,700 KB
testcase_13 AC 463 ms
24,892 KB
testcase_14 AC 761 ms
34,492 KB
testcase_15 AC 861 ms
36,000 KB
testcase_16 AC 828 ms
36,244 KB
testcase_17 AC 826 ms
35,940 KB
testcase_18 AC 827 ms
36,160 KB
testcase_19 AC 828 ms
35,944 KB
testcase_20 AC 831 ms
36,284 KB
testcase_21 AC 733 ms
35,944 KB
testcase_22 AC 743 ms
36,012 KB
testcase_23 AC 782 ms
35,944 KB
testcase_24 AC 748 ms
35,940 KB
testcase_25 AC 819 ms
36,008 KB
testcase_26 AC 812 ms
35,944 KB
testcase_27 AC 836 ms
36,152 KB
testcase_28 AC 830 ms
36,012 KB
testcase_29 AC 739 ms
36,012 KB
testcase_30 AC 851 ms
36,016 KB
testcase_31 AC 833 ms
36,204 KB
testcase_32 AC 806 ms
35,944 KB
testcase_33 AC 822 ms
36,280 KB
testcase_34 AC 844 ms
36,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
diff = [A[i]!=B[i] for i in range(N)]

flip = 1 if diff[0] else 0
for idx in range(1,N):
  if diff[idx-1] != diff[idx] and diff[idx]:
    flip += 1
print(flip)

0