結果

問題 No.2209 Flip and Reverse
ユーザー shobonvipshobonvip
提出日時 2023-02-10 21:29:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 86,792 KB
実行使用メモリ 81,640 KB
最終ジャッジ日時 2023-09-21 22:32:42
合計ジャッジ時間 5,200 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,116 KB
testcase_01 AC 71 ms
71,292 KB
testcase_02 AC 72 ms
71,136 KB
testcase_03 AC 72 ms
71,436 KB
testcase_04 AC 73 ms
71,356 KB
testcase_05 AC 73 ms
71,340 KB
testcase_06 AC 73 ms
70,988 KB
testcase_07 AC 74 ms
71,360 KB
testcase_08 AC 98 ms
81,092 KB
testcase_09 AC 73 ms
71,116 KB
testcase_10 AC 72 ms
71,404 KB
testcase_11 AC 72 ms
71,200 KB
testcase_12 AC 72 ms
70,988 KB
testcase_13 AC 74 ms
71,416 KB
testcase_14 AC 104 ms
81,172 KB
testcase_15 AC 104 ms
81,300 KB
testcase_16 AC 102 ms
81,640 KB
testcase_17 AC 104 ms
81,480 KB
testcase_18 AC 106 ms
81,484 KB
testcase_19 AC 104 ms
81,440 KB
testcase_20 AC 105 ms
81,296 KB
testcase_21 AC 105 ms
81,440 KB
testcase_22 AC 104 ms
81,380 KB
testcase_23 AC 105 ms
81,452 KB
testcase_24 AC 105 ms
81,360 KB
testcase_25 AC 102 ms
81,412 KB
testcase_26 AC 102 ms
81,368 KB
testcase_27 AC 101 ms
81,296 KB
testcase_28 AC 95 ms
81,396 KB
testcase_29 AC 97 ms
81,396 KB
testcase_30 AC 96 ms
81,392 KB
testcase_31 AC 95 ms
81,372 KB
testcase_32 AC 95 ms
81,272 KB
testcase_33 AC 93 ms
81,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = input()
t = input()
if s.count("1") % 2 == t.count("1") % 2:
	# EVEN
	ans = 0
	for i in range(n):
		if s[i] != t[i]:
			ans += 1
	print(ans)
else:
	# ODD
	ans = 0
	for i in range(n):
		if s[i] != t[n-i-1]:
			ans += 1
	print(ans)
0