結果
問題 |
No.2209 Flip and Reverse
|
ユーザー |
![]() |
提出日時 | 2023-02-10 21:30:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 120 ms / 2,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 82,216 KB |
実行使用メモリ | 80,896 KB |
最終ジャッジ日時 | 2024-07-07 15:41:57 |
合計ジャッジ時間 | 4,186 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
import sys input = sys.stdin.readline N = int(input()) S = input().rstrip() T = input().rstrip() even = sum(S[i] != T[i] for i in range(N)) odd = sum(S[N-1-i] != T[i] for i in range(N)) ans = 10**18 if even % 2 == 0: ans = even if odd % 2 == 1: ans = min(ans, odd) print(ans)