結果

問題 No.2209 Flip and Reverse
ユーザー Mat_h
提出日時 2023-02-10 21:57:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 14,768 KB
最終ジャッジ日時 2024-07-07 16:11:58
合計ジャッジ時間 6,988 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 3 WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

def Main():
    n=int(input())
    s=input()
    t=input()
    s1=s[::-1]
    ans=0
    ans1=0
    for i in range(n):
        if s[i]!=t[i]:
            ans+=1
        if s1[i]!=t[i]:
            ans1+=1
    if ans%2==0:
        ans=n-ans
    print(ans)
    
Main()
0