結果

問題 No.846 メダル
コンテスト
ユーザー simamumu
提出日時 2019-07-05 21:37:25
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 25 ms / 2,000 ms
+ 386µs
コード長 549 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 56 ms
コンパイル使用メモリ 15,360 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2026-09-11 06:51:55
合計ジャッジ時間 2,259 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

P,Q,R = inpl()
A,B,C = inpl()

MIN = max(P*(A-1),Q*(A+B-1),R*(A+B+C-1))
MAX = min(P*(A)  ,Q*(A+B)  ,R*(A+B+C))
#print(P*(A-1),Q*(A+B-1),R*(A+B+C-1))
#print(P*(A)  ,Q*(A+B)  ,R*(A+B+C))

if MIN >= MAX:
    print(-1)
else:
    print(MIN+1,MAX)
0