結果

問題 No.734 Careful Engineer
ユーザー simamumusimamumu
提出日時 2018-09-28 21:43:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-04-20 11:00:38
合計ジャッジ時間 1,975 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
11,264 KB
testcase_01 AC 35 ms
11,392 KB
testcase_02 AC 35 ms
11,392 KB
testcase_03 AC 35 ms
11,392 KB
testcase_04 AC 36 ms
11,264 KB
testcase_05 AC 36 ms
11,264 KB
testcase_06 AC 36 ms
11,392 KB
testcase_07 AC 35 ms
11,264 KB
testcase_08 AC 35 ms
11,264 KB
testcase_09 AC 35 ms
11,264 KB
testcase_10 AC 35 ms
11,264 KB
testcase_11 AC 36 ms
11,264 KB
testcase_12 AC 34 ms
11,392 KB
testcase_13 AC 34 ms
11,392 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