結果
| 問題 | No.1122 Plane Tickets |
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2020-07-23 01:04:41 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 360 bytes |
| 記録 | |
| コンパイル時間 | 541 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,612 KB |
| 最終ジャッジ日時 | 2026-03-07 18:28:55 |
| 合計ジャッジ時間 | 9,537 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 44 WA * 11 |
ソースコード
a = list(map(int, input().split()))
def check(x):
y = x + x
res = 0
for i in range(5):
res += a[i] * x[i]
s = sum(y[i:i+3])
if s == 0:
return (False, 0)
return (True, res)
ans = None
for i in range(1, 2**5):
x = [(i>>j)&1 for j in range(5)]
y = check(x)
if y[0]:
if ans == None or ans > y[1]:
ans = y[1]
print(ans)
koyumeishi