結果

問題 No.846 メダル
ユーザー kbyskbys
提出日時 2020-03-30 23:35:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-09-05 11:20:23
合計ジャッジ時間 1,982 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 16 ms
7,860 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,836 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 15 ms
7,960 KB
testcase_16 AC 15 ms
7,876 KB
testcase_17 WA -
testcase_18 AC 16 ms
7,924 KB
testcase_19 AC 15 ms
7,924 KB
testcase_20 AC 15 ms
7,880 KB
testcase_21 WA -
testcase_22 AC 15 ms
7,928 KB
testcase_23 AC 15 ms
7,916 KB
testcase_24 AC 15 ms
7,944 KB
testcase_25 AC 16 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p,q,r = map(int,input().split())
gold,sil,bro = map(int,input().split())

gold_l = (gold-1)*p+1#金の情報だけで推測できるNの最小値
gold_r = gold*p#最大値

#print(gold_l,gold_r)

sil_l = (sil+gold-1)*q+1
sil_r = (sil+gold)*q

#print(sil_l,sil_r)

bro_l = (bro+gold+sil-1)*r+1
bro_r = (bro+gold+sil)*r

if bro_l > max(sil_r,gold_r) or bro_r < min(gold_l,sil_l):
    print(-1)
else:
    print(bro_l,bro_r)
0