結果

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

ソースコード

diff #

Sb = input()
N = int(input())
Sa = input()

is_success = lambda b: 'SUCCESS' if b else 'FAILURE'

if Sb.count('o') != Sa.count('o'):
    print(is_success(True))
elif N == 0:
    print(is_success(Sb != Sa))
elif N >= 2:
    print(is_success(False))
else:
    print(is_success(Sb[1] + Sb[0] + Sb[2] != Sa and Sb[0] + Sb[2] + Sb[1] != Sa))
0