結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
Tawara
|
| 提出日時 | 2015-08-28 15:02:27 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 1,000 ms |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 77,464 KB |
| 最終ジャッジ日時 | 2025-12-03 16:27:12 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 43 |
ソースコード
sb = raw_input()
N = input()
sa = raw_input()
bc = sb.count("o")
ac = sa.count("o")
if bc != ac:
print "SUCCESS"
elif bc == 0 or bc == 3:
print "FAILURE"
else:
m = "o" if bc == 1 else "x"
bidx = sb.index(m)
aidx = sa.index(m)
if (N == 0 and aidx != bidx) or (N == 1 and (aidx == bidx == 1 or abs(aidx-bidx)==2)):
print "SUCCESS"
else:
print "FAILURE"
Tawara