結果

問題 No.2209 Flip and Reverse
ユーザー tamatotamato
提出日時 2023-02-10 21:24:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 1,742 ms
コンパイル使用メモリ 86,628 KB
実行使用メモリ 81,272 KB
最終ジャッジ日時 2023-09-21 22:24:38
合計ジャッジ時間 5,860 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,256 KB
testcase_01 AC 71 ms
71,056 KB
testcase_02 AC 70 ms
71,248 KB
testcase_03 AC 71 ms
71,336 KB
testcase_04 AC 70 ms
71,312 KB
testcase_05 AC 71 ms
71,048 KB
testcase_06 AC 72 ms
71,196 KB
testcase_07 AC 70 ms
71,080 KB
testcase_08 WA -
testcase_09 AC 71 ms
71,248 KB
testcase_10 AC 72 ms
71,228 KB
testcase_11 AC 71 ms
71,256 KB
testcase_12 AC 71 ms
71,096 KB
testcase_13 WA -
testcase_14 AC 144 ms
80,908 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 148 ms
80,984 KB
testcase_19 AC 148 ms
81,012 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 145 ms
80,984 KB
testcase_24 AC 137 ms
81,152 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 123 ms
80,876 KB
testcase_29 AC 124 ms
81,052 KB
testcase_30 AC 122 ms
80,696 KB
testcase_31 WA -
testcase_32 AC 121 ms
81,020 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    S = input().rstrip('\n')
    T = input().rstrip('\n')

    ans = 0
    for s, t in zip(S, T):
        if s != t:
            ans += 1
    ans2 = 0
    for s, t in zip(S, T[::-1]):
        if s != t:
            ans2 += 1
    print(min(ans, ans2))


if __name__ == '__main__':
    main()
0