結果

問題 No.197 手品
ユーザー 👑 rin204rin204
提出日時 2022-01-20 08:31:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 552 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 71,288 KB
最終ジャッジ日時 2023-08-15 08:31:01
合計ジャッジ時間 6,460 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 72 ms
71,276 KB
testcase_04 AC 71 ms
71,232 KB
testcase_05 AC 73 ms
71,264 KB
testcase_06 AC 70 ms
71,260 KB
testcase_07 AC 71 ms
71,264 KB
testcase_08 AC 70 ms
71,032 KB
testcase_09 AC 70 ms
71,184 KB
testcase_10 AC 69 ms
71,220 KB
testcase_11 AC 71 ms
71,192 KB
testcase_12 WA -
testcase_13 AC 71 ms
71,260 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 72 ms
71,256 KB
testcase_24 AC 70 ms
70,972 KB
testcase_25 AC 72 ms
71,096 KB
testcase_26 AC 71 ms
71,096 KB
testcase_27 WA -
testcase_28 AC 70 ms
71,100 KB
testcase_29 WA -
testcase_30 AC 71 ms
71,232 KB
testcase_31 AC 71 ms
71,224 KB
testcase_32 AC 72 ms
71,276 KB
testcase_33 WA -
testcase_34 AC 72 ms
71,248 KB
testcase_35 AC 70 ms
70,788 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 71 ms
71,088 KB
testcase_39 WA -
testcase_40 AC 69 ms
71,168 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 71 ms
71,032 KB
testcase_44 WA -
testcase_45 AC 71 ms
71,264 KB
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

bef = input()
n = int(input())
aft = input()

def suc():
    print("SUCCESS")

def fai():
    print("FAILURE")

if bef.count("o") != aft.count("o"):
    suc()
elif len(bef) == 1:
    fai()
elif n == 0:
    if bef != aft:
        suc()
    else:
        fai()
else:
    if bef.count("o") == 1:
        x = (bef[1] == "o") ^ (aft[1] == "o")
        if x ^ (n % 2 == 0):
            fai()
        else:
            suc()
    else:
        x = (bef[1] == "x") ^ (aft[1] == "x")
        if x ^ (n % 2 == 0):
            fai()
        else:
            suc()
0