結果

問題 No.197 手品
ユーザー nebukuro09
提出日時 2016-10-19 16:33:21
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 364 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-06-27 13:35:15
合計ジャッジ時間 1,788 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19 WA * 19 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

a = raw_input()
N = input()
b = raw_input()

o1, o2 = a.count('o'), b.count('o')
if o1 == o2 == 1 or o1 == o2 == 2:
    ox = 'o' if o1 == 1 else 'x'
    diff = abs(a.index(ox)-b.index(ox))
    if diff % 2 == N % 2 and diff <= N:
        ans = 'FAILURE'
    else:
        ans = 'SUCCESS'
elif o1 == o2 == o3:
    ans = 'FAILURE'
else:
    ans = 'SUCCESS'
print ans
0