結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-06 13:26:04 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 109 ms / 1,000 ms |
| コード長 | 1,361 bytes |
| 記録 | |
| コンパイル時間 | 643 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 35,924 KB |
| 最終ジャッジ日時 | 2026-04-02 20:19:53 |
| 合計ジャッジ時間 | 5,795 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 43 |
ソースコード
import sys
def solve():
sb = input()
n = int(input())
sa = input()
f = 'FAILURE'
s = 'SUCCESS'
if n == 0:
if sb == sa:
print(f)
else:
print(s)
return
if sb == 'ooo' or sb == 'xxx':
if sb == sa:
print(f)
else:
print(s)
return
if sb.count('o') != sa.count('o'):
print(s)
return
if n == 1:
if sb == 'oxx':
if sa == 'oxx' or sa == 'xox':
print(f)
else:
print(s)
elif sb == 'xox':
if sa == 'oxx' or sa == 'xxo':
print(f)
else:
print(s)
elif sb == 'xxo':
if sa == 'xxo' or sa == 'xox':
print(f)
else:
print(s)
elif sb == 'oox':
if sa == 'oox' or sa == 'oxo':
print(f)
else:
print(s)
elif sb == 'oxo':
if sa == 'oox' or sa == 'xoo':
print(f)
else:
print(s)
elif sb == 'xoo':
if sa == 'oxo' or sa == 'xoo':
print(f)
else:
print(s)
else:
raise
else:
print(f)
if __name__ == '__main__':
solve()