結果

問題 No.197 手品
コンテスト
ユーザー nebukuro09
提出日時 2018-09-07 05:00:23
言語 PyPy2
(7.3.20)
結果
WA  
実行時間 -
コード長 369 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 139 ms
コンパイル使用メモリ 77,372 KB
最終ジャッジ日時 2025-12-04 01:22:24
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 36 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

S = raw_input()
N = input()
T = raw_input()

if S.count('o') != T.count('o'):
    print "SUCCESS"
elif S.count('o') == 0 or S.count('o') == 3:
    print "FAILURE"
else:
    target = 'o' if S.count('o') == 1 else 'x'
    if S[1] == target and S == T:
        print "SUCCESS"
    else:
        print "SUCCESS" if abs(S.index(target) - T.index(target)) > N else "FAILURE"
0