結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
cherrypi59
|
| 提出日時 | 2018-06-22 23:04:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 881 bytes |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-30 18:08:23 |
| 合計ジャッジ時間 | 2,695 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 39 WA * 4 |
ソースコード
def main():
sb, n, sa = input(), int(input()), input()
if sb.count("o") != sa.count("o"):
print("SUCCESS")
if sb.count("o") == 3 or sa.count("x") == 3:
print("FAILURE")
elif n > 1:
print("FAILURE")
elif n == 0:
if sb == sa:
print("FAILURE")
else:
print("SUCCESS")
else:
if sb.count("o") == 1:
if sb[1] == "o" and sa[1] == "o":
print("SUCCESS")
elif abs(sb.index("o")-sa.index("o")) == 2:
print("SUCCESS")
else:
print("FAILURE")
else:
if sb[1] == "x" and sa[1] == "x":
print("SUCCESS")
elif abs(sb.index("x")-sa.index("x")) == 2:
print("SUCCESS")
else:
print("FAILURE")
if __name__ == '__main__':
main()
cherrypi59