题解 | #表达式求导#
表达式求导
https://ac.nowcoder.com/acm/contest/84773/B
B题没有理解,全是技巧^_^
from math import log
def main():
for _ in range(int(input())):
s = input()
x = float(input())
dx = 1e-8
y1 = eval(s,{"ln":log,"x":x+dx})
y0 = eval(s,{"ln":log,"x":x-dx})
print(f"{(y1-y0)/(dx*2.0):.2f}")
main()
传音控股公司福利 301人发布
查看24道真题和解析