結果

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

ソースコード

diff #
raw source code

sb=raw_input()
n=int(raw_input())
sa=raw_input()
c=0
if n == 0 and (sb.count("x") != sa.count("x")) or (sb.count("o") != sa.count("o")):
    print("SUCCESS")
elif n == 1:
    if ("o" in sb[2] and "o" in sa[0]) or ("o" in sb[0] and "o" in sa[2]):
        if ("o" in sb[1]) and ("o" in sa[1]):
            if ("o" in sb[0] and "o" in sa[2]) or ("o" in sb[2] and "o" in sa[2]):
                print("FAILURE")
            else:
                print("SUCCESS")
    else:
        for i in range(0,3):
            if sb[i] == sa[i]:
                c+=1
        if c == 3:
            print("FAILURE")
else:
    print("FAILURE")
0