結果

問題 No.197 手品
ユーザー brthyyjp
提出日時 2021-06-11 19:07:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 464 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,064 KB
実行使用メモリ 53,572 KB
最終ジャッジ日時 2024-12-14 16:33:42
合計ジャッジ時間 3,317 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 41 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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:
    L = []
    for i in range(3):
        if s[i] != t[i]:
            L.append(i)
    if not L:
        print('FAILURE')
        exit()
    if L[1]-L[0] == 1:
        print('FAILURE')
    else:
        print('SUCCESS')
else:
    print('FAILURE')
0