結果
問題 |
No.2209 Flip and Reverse
|
ユーザー |
|
提出日時 | 2023-02-10 21:48:40 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 302 ms |
コンパイル使用メモリ | 82,268 KB |
実行使用メモリ | 189,404 KB |
最終ジャッジ日時 | 2024-07-07 16:01:58 |
合計ジャッジ時間 | 7,430 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 += 2 Y = sum(S[N-1-i]!=T[i] for i in range(N)) if Y%2==0: Y += 1 print(min(X,Y))