結果
| 問題 |
No.846 メダル
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2019-07-05 22:27:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 465 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-06 22:21:30 |
| 合計ジャッジ時間 | 1,598 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 1 |
ソースコード
# 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 max(0, min(r1,r2,r3) - max(l1,l2,l3))==0: print(-1)
else:
print(max(l1,l2,l3),min(r1,r2,r3))
convexineq