結果

問題 No.197 手品
ユーザー nebukuro09nebukuro09
提出日時 2016-10-19 16:32:28
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 330 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 6,736 KB
実行使用メモリ 6,224 KB
最終ジャッジ日時 2023-09-09 21:05:08
合計ジャッジ時間 2,430 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 10 ms
6,032 KB
testcase_04 AC 11 ms
6,168 KB
testcase_05 AC 11 ms
5,976 KB
testcase_06 AC 11 ms
6,160 KB
testcase_07 RE -
testcase_08 AC 11 ms
6,020 KB
testcase_09 AC 11 ms
6,056 KB
testcase_10 AC 11 ms
6,020 KB
testcase_11 AC 10 ms
6,032 KB
testcase_12 RE -
testcase_13 AC 11 ms
6,080 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 11 ms
6,080 KB
testcase_24 AC 11 ms
5,968 KB
testcase_25 AC 10 ms
6,036 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 10 ms
6,032 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 AC 11 ms
6,080 KB
testcase_36 RE -
testcase_37 RE -
testcase_38 AC 11 ms
6,144 KB
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 AC 10 ms
6,036 KB
testcase_44 RE -
testcase_45 AC 11 ms
6,080 KB
testcase_46 RE -
権限があれば一括ダウンロードができます

ソースコード

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'
elif o1 == o2 == o3:
    ans = 'FAILURE'
else:
    ans = 'SUCCESS'
print ans
0