結果
| 問題 |
No.2209 Flip and Reverse
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2023-02-10 21:25:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 536 ms / 2,000 ms |
| コード長 | 219 bytes |
| コンパイル時間 | 227 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 14,772 KB |
| 最終ジャッジ日時 | 2024-07-07 15:33:55 |
| 合計ジャッジ時間 | 13,004 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
N=int(input())
S=input().strip()
T=input().strip()
U=S[::-1]
x=0
y=0
for i in range(N):
if S[i]!=T[i]:
x+=1
if U[i]!=T[i]:
y+=1
if x%2==1:
x=1<<64
if y%2==0:
y=1<<64
print(min(x,y))
titia