結果

問題 No.2209 Flip and Reverse
ユーザー shobonvip
提出日時 2023-02-10 21:29:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 82,112 KB
実行使用メモリ 80,744 KB
最終ジャッジ日時 2024-07-07 15:40:01
合計ジャッジ時間 3,056 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

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