結果

問題 No.2209 Flip and Reverse
ユーザー YutaYuta
提出日時 2023-03-14 17:35:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 11,928 KB
実行使用メモリ 25,088 KB
最終ジャッジ日時 2023-10-18 11:54:34
合計ジャッジ時間 5,032 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 29 ms
10,152 KB
testcase_03 WA -
testcase_04 AC 28 ms
10,152 KB
testcase_05 AC 28 ms
10,152 KB
testcase_06 AC 28 ms
10,152 KB
testcase_07 AC 28 ms
10,152 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input(""))
S = input("")
T = input("")

counter = 0
i = 0

def flip_number(S):
    S = S[::-1]

    return S

def change_number(S):
    S = list(S)
    if S[i] == "0":
        S[i] = "1"
    else:
        S[i] = "0"
    return S



    
for j in range(N):
    if S!= T:
        change_number(S)
        flip_number(S)
        counter += 1
        i += 1
    elif S == T:
        break

print(counter)
0