結果

問題 No.197 手品
コンテスト
ユーザー rf141
提出日時 2015-07-03 23:38:35
言語 PyPy2
(7.3.20)
結果
WA  
実行時間 -
コード長 777 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 137 ms
コンパイル使用メモリ 77,156 KB
最終ジャッジ日時 2025-12-03 15:46:29
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 38 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

sb=raw_input()
n=int(raw_input())
sa=raw_input()

if n == 0 and sb.count("o") != sa.count("o"):
    print("SUCCESS")
elif n== 0 and (sb.count("o") == sa.count("o")):
    print("FAILURE")
elif n == 1:
    if sb[1] in "o" and sa[1] in "o":
        if ("o" in sb[0] and "o" in sa[2]) or ("o" in sb[2] and "o" in sa[0]):
            print("FAILURE")
        else:
            print("SUCCESS")
    elif sb.count("o") != sa.count("o"):
        print("SUCCESS")
    else:
        if sb.count("o") == sa.count("o") and sb == sa:
            print("FAILURE")
        elif sb.count("o") == sa.count("o") and sb != sa:
            print("FAILURE")
        else:
            print("SUCCESS")
elif n >= 2 and (sb.count("o") == sa.count("o")):
    print("FAILURE")
else:
    print("SUCCESS")
0