結果

問題 No.197 手品
ユーザー kamome
提出日時 2020-04-12 22:30:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 533 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-20 04:01:21
合計ジャッジ時間 2,809 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

before=str(input())
N=int(input())
after=str(input())
if before.count("o") != after.count("o"):
    print("SUCCESS")
    exit()
if before.count("o") ==3 or before.count("x")==3:
    print("FAILURE")
    exit()
if N > 1:
    print("FAILURE")
    exit()
elif N == 0 and (before != after):
    print("SUCCESS")
    exit()
elif N==1 and (before == after) and (before == before[::-1]):
    print("SUCCESS")
    exit()
elif N==1 and (before != after) and (after == before[::-1]):
    print("SUCCESS")
    exit()
else:
    print("FAILURE")
0