题解 | 小红的函数最大值

小红的函数最大值

https://www.nowcoder.com/practice/ef7f1d579daa4d349abd120a70b708e8

import sys
import math
for line in sys.stdin:
    nums=list(map(int,line.strip().split()))
    #print(int(a[0]) + int(a[1]))
    a= nums[0]
    b= nums[1]
    x= 1/(b*math.log(a))
    max_value=math.log(x,a)-b*x
    print(round(max_value,10))

#刷题#
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务