結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,360 KB
testcase_01 AC 73 ms
71,296 KB
testcase_02 AC 73 ms
71,188 KB
testcase_03 AC 75 ms
71,380 KB
testcase_04 AC 74 ms
71,216 KB
testcase_05 AC 74 ms
71,324 KB
testcase_06 AC 74 ms
71,216 KB
testcase_07 AC 75 ms
71,256 KB
testcase_08 AC 74 ms
71,164 KB
testcase_09 AC 76 ms
71,428 KB
testcase_10 AC 74 ms
71,288 KB
testcase_11 AC 74 ms
71,424 KB
testcase_12 AC 75 ms
71,196 KB
testcase_13 AC 73 ms
71,188 KB
testcase_14 AC 76 ms
71,384 KB
testcase_15 AC 74 ms
71,204 KB
testcase_16 AC 76 ms
71,408 KB
testcase_17 AC 74 ms
71,356 KB
testcase_18 AC 75 ms
71,128 KB
testcase_19 AC 75 ms
71,240 KB
testcase_20 AC 73 ms
71,224 KB
testcase_21 WA -
testcase_22 AC 75 ms
70,984 KB
testcase_23 AC 75 ms
70,984 KB
testcase_24 AC 75 ms
71,304 KB
testcase_25 AC 75 ms
71,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P,Q,R = map(int,input().split())
A,B,C = map(int,input().split())
l = 0
r = 10**18
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