結果

問題 No.1101 鼻水
ユーザー roarisroaris
提出日時 2020-07-03 23:14:24
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 53,596 KB
最終ジャッジ日時 2023-10-17 06:15:23
合計ジャッジ時間 2,621 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,596 KB
testcase_01 AC 41 ms
53,596 KB
testcase_02 AC 41 ms
53,596 KB
testcase_03 AC 41 ms
53,596 KB
testcase_04 AC 41 ms
53,596 KB
testcase_05 AC 41 ms
53,596 KB
testcase_06 AC 41 ms
53,596 KB
testcase_07 AC 42 ms
53,596 KB
testcase_08 AC 44 ms
53,596 KB
testcase_09 AC 42 ms
53,596 KB
testcase_10 AC 42 ms
53,596 KB
testcase_11 AC 41 ms
53,596 KB
testcase_12 AC 42 ms
53,596 KB
testcase_13 AC 42 ms
53,596 KB
testcase_14 AC 41 ms
53,596 KB
testcase_15 AC 41 ms
53,596 KB
testcase_16 AC 41 ms
53,596 KB
testcase_17 AC 41 ms
53,596 KB
testcase_18 AC 42 ms
53,596 KB
testcase_19 AC 41 ms
53,596 KB
testcase_20 AC 41 ms
53,596 KB
testcase_21 AC 42 ms
53,596 KB
testcase_22 AC 41 ms
53,596 KB
testcase_23 AC 41 ms
53,596 KB
testcase_24 AC 40 ms
53,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

def judge(x):
    if x%T==0:
        return x-(x-1)//T-V*P<=V
    else:
        return x-x//T-V*P<=V
        
def binary_search():
    l, r = 0, 10**20
    
    while l<=r:
        m = (l+r)//2
        
        if judge(m):
            l = m+1
        else:
            r = m-1
    
    return r

V, T, P = map(int, input().split())
print(binary_search()+1)
0