結果

問題 No.734 Careful Engineer
ユーザー simamumusimamumu
提出日時 2018-09-28 21:43:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 11,012 KB
実行使用メモリ 10,464 KB
最終ジャッジ日時 2023-08-02 11:34:58
合計ジャッジ時間 1,668 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,244 KB
testcase_01 AC 31 ms
10,228 KB
testcase_02 AC 31 ms
10,288 KB
testcase_03 AC 32 ms
10,292 KB
testcase_04 AC 31 ms
10,400 KB
testcase_05 AC 32 ms
10,332 KB
testcase_06 AC 31 ms
10,212 KB
testcase_07 AC 32 ms
10,396 KB
testcase_08 AC 31 ms
10,464 KB
testcase_09 AC 31 ms
10,352 KB
testcase_10 AC 31 ms
10,292 KB
testcase_11 AC 30 ms
10,212 KB
testcase_12 AC 31 ms
10,396 KB
testcase_13 AC 31 ms
10,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

a,b,c = inpl()
a *= 60
c *= 60*60

def check(N):
    t = a*N
    p = c+b*N
    return t >= p

if b >= a:
    print(-1)
else:
    OK = 10**30
    NG = 0
    while OK - NG > 1:
        mid = (OK+NG)//2
        if check(mid):
            OK = mid
        else:
            NG = mid
    print(OK)
0