結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
matsu7874
|
| 提出日時 | 2015-10-12 15:55:48 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 580 bytes |
| 記録 | |
| コンパイル時間 | 559 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-03-15 10:17:19 |
| 合計ジャッジ時間 | 6,476 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 37 WA * 6 |
ソースコード
S_b = [c for c in input()]
N = int(input())
S_a = [c for c in input()]
o_b = S_b.count('o')
o_a = S_a.count('o')
if o_b!=o_a:
print('SUCCESS')
exit()
if o_b==0 or o_b == 3:
print('FAILURE')
exit()
t = 'o'
if o_b == 2:
t = 'x'
d = abs(S_b.index(t) - S_a.index(t))
if N == 0:
if S_b != S_a:
print('SUCCESS')
else:
print('FAILURE')
elif N == 1:
if d != 1:
print('SUCCESS')
else:
print('FAILURE')
elif N==2:
if d == 1:
print('SUCCESS')
else:
print('FAILURE')
elif N>2:
print('FAILURE')
matsu7874