为什么g(x)
from matplotlib import pyplot
if __name__ == '__main__':
f = lambda n, d: sum([int(x) for x in str(d)*n])
g = lambda k: sum([int(f(a,a)/a -1) for a in range(1,k)])/k
a = [g(x) for x in range(1,100)]
pyplot.plot(a)
pyplot.show()
如果您这样做,它会变得更奇怪
a = [g(i)/float(i) for i in range(1,100)]