結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
cherrypi59
|
| 提出日時 | 2018-06-22 22:47:51 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 488 bytes |
| 記録 | |
| コンパイル時間 | 878 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 20,568 KB |
| 最終ジャッジ日時 | 2026-03-21 02:53:54 |
| 合計ジャッジ時間 | 6,888 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 39 WA * 2 RE * 2 |
ソースコード
def main():
sb, n, sa = input(), int(input()), input()
if sb.count("o") != sa.count("o"):
print("SUCCESS")
elif n > 1:
print("FAILURE")
elif n == 0:
if sb == sa:
print("FAILURE")
else:
print("SUCCESS")
else:
if abs(sb.index("o")-sa.index("o")) == 2 or abs(sb.index("x")-sa.index("x")) == 2:
print("SUCCESS")
else:
print("FAILURE")
if __name__ == '__main__':
main()
cherrypi59