結果
問題 | No.197 手品 |
ユーザー |
|
提出日時 | 2016-10-19 16:34:11 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 342 bytes |
コンパイル時間 | 40 ms |
コンパイル使用メモリ | 6,784 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-06-27 13:35:35 |
合計ジャッジ時間 | 1,695 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 WA * 2 RE * 5 |
ソースコード
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 <= N: ans = 'FAILURE' else: ans = 'SUCCESS' elif o1 == o2 == o3: ans = 'FAILURE' else: ans = 'SUCCESS' print ans