結果
問題 |
No.453 製薬会社
|
ユーザー |
![]() |
提出日時 | 2020-03-05 10:21:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 684 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-14 00:51:00 |
合計ジャッジ時間 | 1,393 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 |
ソースコード
#!/usr/bin/env python3 # %% import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines eps = 1e-8 # %% C, D = map(int, read().split()) # %% def gen_cand(C, D): b = (3 * D - C) * 7 / 13 a = 4 * D - 20 * b / 7 yield (a, b) yield (4 * C / 3, 0) yield (4 * D, 0) yield (0, 7 * C / 2) yield (0, 7 * D / 5) # %% answer = 0 for a, b in gen_cand(C, D): if a < 0 or b < 0: continue if (3 / 4) * a + (2 / 7) * b > C + eps: continue if (1 / 4) * a + (5 / 7) * b > D + eps: continue x = 1000 * a + 2000 * b if answer < x: answer = x # %% print(answer)