結果

問題 No.2209 Flip and Reverse
ユーザー Mat_hMat_h
提出日時 2023-02-10 21:48:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,508 KB
実行使用メモリ 11,060 KB
最終ジャッジ日時 2023-09-21 22:57:11
合計ジャッジ時間 6,954 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,784 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 AC 16 ms
7,784 KB
testcase_04 AC 16 ms
7,796 KB
testcase_05 AC 15 ms
7,788 KB
testcase_06 AC 15 ms
7,764 KB
testcase_07 AC 16 ms
7,916 KB
testcase_08 WA -
testcase_09 AC 16 ms
7,884 KB
testcase_10 AC 15 ms
7,812 KB
testcase_11 AC 15 ms
7,760 KB
testcase_12 AC 15 ms
7,772 KB
testcase_13 WA -
testcase_14 AC 210 ms
10,960 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 210 ms
11,060 KB
testcase_19 AC 209 ms
11,020 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 209 ms
10,920 KB
testcase_24 AC 200 ms
10,964 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 183 ms
10,952 KB
testcase_29 AC 183 ms
11,004 KB
testcase_30 AC 184 ms
11,000 KB
testcase_31 WA -
testcase_32 AC 182 ms
11,008 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

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
    
    print(min(ans,ans1))
    
Main()
0