結果

問題 No.734 Careful Engineer
ユーザー simamumu
提出日時 2018-09-28 21:43:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2025-06-20 00:43:37
合計ジャッジ時間 1,370 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

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