結果
問題 |
No.2209 Flip and Reverse
|
ユーザー |
![]() |
提出日時 | 2023-02-10 21:24:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 265 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 174,544 KB |
最終ジャッジ日時 | 2024-07-07 15:32:36 |
合計ジャッジ時間 | 6,102 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 17 WA * 13 |
ソースコード
N = int(input()) S = list(input()) T = list(input()) Sr = S[::-1] cnt1, cnt2 = 0, 0 for i in range(N): if S[i] != T[i]: cnt1 += 1 if Sr[i] != T[i]: cnt2 += 1 if cnt1 % 2: cnt1 += 1 if cnt2 % 2 == 0: cnt2 += 1 print( min(cnt1, cnt2) )