結果

問題 No.846 メダル
ユーザー OhnumaOhnuma
提出日時 2020-04-10 16:36:12
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 317 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 141,244 KB
最終ジャッジ日時 2023-10-13 07:31:45
合計ジャッジ時間 4,256 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
12,372 KB
testcase_01 AC 16 ms
7,980 KB
testcase_02 AC 16 ms
7,996 KB
testcase_03 AC 16 ms
7,980 KB
testcase_04 AC 16 ms
7,912 KB
testcase_05 AC 16 ms
7,972 KB
testcase_06 AC 16 ms
7,928 KB
testcase_07 AC 17 ms
8,080 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+1):
    if ceil(i/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(min(ret),max(ret))
0