結果
| 問題 | No.846 メダル |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2019-07-05 22:28:56 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 2,000 ms |
| + 932µs | |
| コード長 | 454 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-11 07:36:32 |
| 合計ジャッジ時間 | 2,462 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
ソースコード
# coding: utf-8
# Your code here!
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意
p,q,r = [int(i) for i in readline().split()]
a,b,c = [int(i) for i in readline().split()]
def f(a,p):
return ((a-1)*p+1, a*p)
l1,r1 = f(a,p)
l2,r2 = f(a+b,q)
l3,r3 = f(a+b+c,r)
#print(f(a,p), f(a+b,q),f(a+c,r))
if min(r1,r2,r3) < max(l1,l2,l3): print(-1)
else:
print(max(l1,l2,l3),min(r1,r2,r3))
convexineq