php用循环实现:
$n=64; $rs=$n; while($n>1) { $rs*=(--$n); print $n."\n"; } print $rs;
结果: 1.2688693218588E+89
Python用lambda表达式实现:
>>> reduce(lambda x,y: x*y, range(1,64+1))
结果:12688693218588416410343338933516148080286551617454519219880189437521470423040000
0000000000L
原创文章,作者:苏葳,如需转载,请注明出处:https://www.swmemo.com/553.html