怎样通过编程求圆周率小数点后的100位,1000位

日期:2018-06-29 23:10:46 人气:3

怎样通过编程求圆周率小数点后的100位,1000位

python版 from sys import stdout scale = 10000 maxarr = 2800 arrinit = 2000 carry = 0 arr = [arrinit] * (maxarr + 1) for i in xrange(maxarr, 1, -14): total = 0 for j in xrange(i, 0, -1): total = (total * j) + (scale * arr[j]) arr[j] =
    A+
热门评论