結果
| 問題 |
No.2209 Flip and Reverse
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-02-10 21:31:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 232 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 179,680 KB |
| 最終ジャッジ日時 | 2024-07-07 15:42:18 |
| 合計ジャッジ時間 | 6,493 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 Sr == T:
cnt2 = 2
print( min(cnt1, cnt2) )
rlangevin