結果

問題 No.197 手品
ユーザー ntudantuda
提出日時 2024-01-01 16:55:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 628 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 53,460 KB
最終ジャッジ日時 2024-01-01 16:55:32
合計ジャッジ時間 3,446 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

S1 = input()
N = int(input())
S2 = input()

def prt(x):
    if x == 0:
        print("FAILURE")
    else:
        print("SUCCESS")
    exit()

if S1.count("o") != S2.count("o"):
    prt(1)
if S1.count("o") == 0 and S2.count("o") == 0:
    prt(0)
if S1.count("x") == 0 and S2.count("x") == 0:
    prt(0)
if N == 0:
    if S1 == S2:
        prt(0)
    else:
        prt(1)

X1 = int(S1.replace("x","0").replace("o","1"),2)
X2 = int(S2.replace("x","0").replace("o","1"),2)
if X1 in [3,5,6]:
    X1 = 7 - X1
    X2 = 7 - X2
if N > 1:
    prt(0)
if X1 == 4:
    X1 = 1
if X2 == 4:
    X2 = 1
if X1 == X2:
    prt(1)
else:
    prt(0)
0