Python浮点数舍入错误
for i_delta in range(0, 101, 1): delta = float(i_delta) / 100 (...)filename = 'foo' + str(int(delta * 100)) + '.dat'
import sys n = int(sys.argv[1])for i in range(0, n + 1): a = int(100 * (float(i) / 100)) if i != a: print i, a
暮色呼如
炎炎设计
相关分类