結果

問題 No.846 メダル
ユーザー kohei2019kohei2019
提出日時 2022-04-27 00:19:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 71,500 KB
最終ジャッジ日時 2023-09-10 16:29:07
合計ジャッジ時間 3,402 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,360 KB
testcase_01 AC 76 ms
71,392 KB
testcase_02 AC 75 ms
71,428 KB
testcase_03 AC 75 ms
71,288 KB
testcase_04 AC 75 ms
70,976 KB
testcase_05 AC 75 ms
71,308 KB
testcase_06 AC 74 ms
71,412 KB
testcase_07 AC 75 ms
71,256 KB
testcase_08 AC 75 ms
71,188 KB
testcase_09 AC 76 ms
71,388 KB
testcase_10 AC 74 ms
71,132 KB
testcase_11 AC 75 ms
71,144 KB
testcase_12 AC 73 ms
71,260 KB
testcase_13 AC 73 ms
71,356 KB
testcase_14 AC 74 ms
71,316 KB
testcase_15 AC 75 ms
71,288 KB
testcase_16 AC 76 ms
71,404 KB
testcase_17 AC 75 ms
71,132 KB
testcase_18 AC 75 ms
71,384 KB
testcase_19 AC 75 ms
71,312 KB
testcase_20 AC 74 ms
71,180 KB
testcase_21 WA -
testcase_22 AC 74 ms
71,252 KB
testcase_23 AC 74 ms
71,356 KB
testcase_24 AC 74 ms
71,188 KB
testcase_25 AC 74 ms
71,500 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