結果
| 問題 |
No.2209 Flip and Reverse
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-10 21:45:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 353 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 82,356 KB |
| 実行使用メモリ | 189,592 KB |
| 最終ジャッジ日時 | 2024-07-07 15:58:40 |
| 合計ジャッジ時間 | 6,492 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 WA * 4 |
ソースコード
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<<60)
Y = sum(S[N-1-i]!=T[i] for i in range(N))
if Y%2==0:
Y += 1
print(min(X,Y))