結果
問題 | No.197 手品 |
ユーザー |
|
提出日時 | 2016-10-19 16:32:28 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-27 13:35:05 |
合計ジャッジ時間 | 1,682 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 1 |
other | AC * 14 RE * 29 |
ソースコード
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