結果

問題 No.846 メダル
ユーザー kohei2019kohei2019
提出日時 2022-04-27 00:20:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 71,508 KB
最終ジャッジ日時 2023-09-10 16:29:10
合計ジャッジ時間 3,335 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,232 KB
testcase_01 AC 75 ms
71,492 KB
testcase_02 AC 74 ms
71,380 KB
testcase_03 AC 75 ms
71,508 KB
testcase_04 AC 74 ms
71,244 KB
testcase_05 AC 77 ms
71,380 KB
testcase_06 AC 75 ms
71,508 KB
testcase_07 AC 74 ms
71,340 KB
testcase_08 AC 75 ms
71,388 KB
testcase_09 AC 76 ms
71,200 KB
testcase_10 AC 74 ms
71,496 KB
testcase_11 AC 75 ms
71,260 KB
testcase_12 AC 75 ms
71,372 KB
testcase_13 AC 74 ms
71,292 KB
testcase_14 AC 75 ms
71,368 KB
testcase_15 AC 75 ms
71,384 KB
testcase_16 AC 74 ms
71,272 KB
testcase_17 AC 73 ms
70,984 KB
testcase_18 AC 76 ms
71,292 KB
testcase_19 AC 75 ms
71,132 KB
testcase_20 AC 75 ms
71,136 KB
testcase_21 AC 74 ms
70,980 KB
testcase_22 AC 75 ms
71,352 KB
testcase_23 AC 76 ms
71,268 KB
testcase_24 AC 76 ms
71,216 KB
testcase_25 AC 76 ms
71,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P,Q,R = map(int,input().split())
A,B,C = map(int,input().split())
l = 0
r = 10**30
l = max(l,(A-1)*P)
r = min(r,A*P)
l = max(l,(A+B-1)*Q)
r = min(r,(A+B)*Q)
l = max(l,(A+B+C-1)*R)
r = min(r,(A+B+C)*R)
if l+1 > r:
    print(-1)
else:
    print(l+1,r)
0