結果
| 問題 |
No.846 メダル
|
| コンテスト | |
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-10-29 15:07:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-14 21:29:56 |
| 合計ジャッジ時間 | 2,065 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
ソースコード
# No.846 メダル
p, q, r = [int(s) for s in input().split()]
a, b, c = [int(s) for s in input().split()]
lows = [(a - 1) * p, (a + b -1) * q, (a + b + c -1) * r]
highs = [a * p, (a + b) * q, (a + b + c) * r]
if max(lows) + 1 > min(highs):
print(-1)
else:
print('{} {}'.format(max(lows) + 1, min(highs)))
fV9TwBhUoa9S3eV