結果

問題 No.197 手品
ユーザー brthyyjp
提出日時 2021-06-11 19:14:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 1,000 ms
コード長 405 bytes
コンパイル時間 437 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-12-14 16:43:49
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

s = str(input())
n = int(input())
t = str(input())

if s.count('o') != t.count('o'):
    print('SUCCESS')
    exit()

if n == 0:
    if s != t:
        print('SUCCESS')
    else:
        print('FAILURE')
elif n == 1:
    S = set()
    x = s[1]+s[0]+s[2]
    S.add(x)
    x = s[0]+s[2]+s[1]
    S.add(x)
    if t in S:
        print('FAILURE')
    else:
        print('SUCCESS')
else:
    print('FAILURE')
0