文件名称:1000s--Factorial
- 所属分类:
- 人工智能/神经网络/遗传算法
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 李*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
输入不超过1000的正整数,输出n!=1X2X3....Xn的精确结果
1000!大约等于4*10^2567,因此可以用一个3000个元素的数组f保存,为了方便我们从低位起保存位数据,再倒序输出,即f[0]保存个位,其他类推
每次只需要模拟手算即可完成n!,输出时要忽略前导0-Enter a positive integer less than 1000, Output n! = 1X2X3 .... Xn accurate results 1000! Approximately equal to 4* 10 ^ 2567, so you can use a 3000 element array f preservation, for the convenience since we are saved from the low bits of data, and then reverse the output, that is, f [0] save a bit, so on the other hand each operator only needs to complete the simulation n!, leading to ignore output 0
1000!大约等于4*10^2567,因此可以用一个3000个元素的数组f保存,为了方便我们从低位起保存位数据,再倒序输出,即f[0]保存个位,其他类推
每次只需要模拟手算即可完成n!,输出时要忽略前导0-Enter a positive integer less than 1000, Output n! = 1X2X3 .... Xn accurate results 1000! Approximately equal to 4* 10 ^ 2567, so you can use a 3000 element array f preservation, for the convenience since we are saved from the low bits of data, and then reverse the output, that is, f [0] save a bit, so on the other hand each operator only needs to complete the simulation n!, leading to ignore output 0
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1000's Factorial.c