結果

問題 No.846 メダル
ユーザー OhnumaOhnuma
提出日時 2020-04-10 16:33:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 283 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 174,352 KB
最終ジャッジ日時 2023-10-13 07:29:25
合計ジャッジ時間 4,204 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from math import ceil
p,q,r = map(int, input().split())
a,b,c = map(int, input().split())

ret = []
for i in range(p*(a-1), p*a):
    if ceil(i/q) - a == b:
        if ceil(i/r) - (a+b) == c:
            ret.append(i)
if len(ret)==0:
    print(-1)
else:
    print(max(ret), min(ret))
0