結果
| 問題 |
No.2209 Flip and Reverse
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-10 21:33:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 337 bytes |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 189,676 KB |
| 最終ジャッジ日時 | 2024-07-07 15:43:58 |
| 合計ジャッジ時間 | 7,442 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 WA * 13 |
ソースコード
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline
N = int(input())
S = list(input())[:-1]
T = list(input())[:-1]
X = sum(S[i]!=T[i] for i in range(N))
if X%2:
X += 1
Y = sum(S[N-1-i]!=T[i] for i in range(N))
if Y%2==0:
Y += 1
print(min(X,Y))