結果

問題 No.197 手品
コンテスト
ユーザー cherrypi59
提出日時 2018-06-22 22:47:51
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 488 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 878 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 20,568 KB
最終ジャッジ日時 2026-03-21 02:53:54
合計ジャッジ時間 6,888 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 39 WA * 2 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def main():
    sb, n, sa = input(), int(input()), input()

    if sb.count("o") != sa.count("o"):
        print("SUCCESS")
    elif n > 1:
        print("FAILURE")
    elif n == 0:
        if sb == sa:
            print("FAILURE")
        else:
            print("SUCCESS")
    else:
        if abs(sb.index("o")-sa.index("o")) == 2 or abs(sb.index("x")-sa.index("x")) == 2:
            print("SUCCESS")
        else:
            print("FAILURE")


if __name__ == '__main__':
    main()
0