結果

問題 No.197 手品
ユーザー titiatitia
提出日時 2022-06-02 00:39:22
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 30 ms / 1,000 ms
コード長 552 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,908 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2023-10-21 01:02:33
合計ジャッジ時間 2,504 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,112 KB
testcase_01 AC 26 ms
10,112 KB
testcase_02 AC 29 ms
10,112 KB
testcase_03 AC 27 ms
10,112 KB
testcase_04 AC 25 ms
10,112 KB
testcase_05 AC 30 ms
10,112 KB
testcase_06 AC 26 ms
10,112 KB
testcase_07 AC 25 ms
10,112 KB
testcase_08 AC 25 ms
10,112 KB
testcase_09 AC 24 ms
10,112 KB
testcase_10 AC 25 ms
10,112 KB
testcase_11 AC 25 ms
10,112 KB
testcase_12 AC 24 ms
10,112 KB
testcase_13 AC 26 ms
10,112 KB
testcase_14 AC 25 ms
10,112 KB
testcase_15 AC 25 ms
10,112 KB
testcase_16 AC 25 ms
10,112 KB
testcase_17 AC 25 ms
10,112 KB
testcase_18 AC 26 ms
10,112 KB
testcase_19 AC 26 ms
10,112 KB
testcase_20 AC 25 ms
10,112 KB
testcase_21 AC 25 ms
10,112 KB
testcase_22 AC 25 ms
10,112 KB
testcase_23 AC 25 ms
10,112 KB
testcase_24 AC 26 ms
10,112 KB
testcase_25 AC 26 ms
10,112 KB
testcase_26 AC 27 ms
10,112 KB
testcase_27 AC 26 ms
10,112 KB
testcase_28 AC 26 ms
10,112 KB
testcase_29 AC 25 ms
10,112 KB
testcase_30 AC 25 ms
10,112 KB
testcase_31 AC 26 ms
10,112 KB
testcase_32 AC 26 ms
10,112 KB
testcase_33 AC 25 ms
10,112 KB
testcase_34 AC 27 ms
10,112 KB
testcase_35 AC 26 ms
10,112 KB
testcase_36 AC 26 ms
10,112 KB
testcase_37 AC 27 ms
10,112 KB
testcase_38 AC 26 ms
10,112 KB
testcase_39 AC 28 ms
10,112 KB
testcase_40 AC 26 ms
10,112 KB
testcase_41 AC 26 ms
10,112 KB
testcase_42 AC 26 ms
10,112 KB
testcase_43 AC 26 ms
10,112 KB
testcase_44 AC 26 ms
10,112 KB
testcase_45 AC 26 ms
10,112 KB
testcase_46 AC 29 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if S.count("o")!=T.count("o"):
    print("SUCCESS")
    exit()

if S.count("o")==3 or S.count("o")==0:
    print("FAILURE")
    exit()

if N==0:
    if S==T:
        print("FAILURE")
    else:
        print("SUCCESS")
    exit()

if N==1:
    A=list(S)

    A[0],A[1]=A[1],A[0]

    if A==list(T):
        print("FAILURE")
        exit()

    A[0],A[1]=A[1],A[0]
    A[2],A[1]=A[1],A[2]

    if A==list(T):
        print("FAILURE")
        exit()

    print("SUCCESS")
    exit()

if N>=2:
    print("FAILURE")
    
0