随笔分类 -  数学技巧

一些与数学技巧相关的编程经验。
摘要:源于hdu1013题目描述:The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that... 阅读全文
posted @ 2014-11-23 17:45 nipan 阅读(766) 评论(0) 推荐(0) 编辑
摘要:一、精确计算1000!的阶乘1000!有多大呢?拿微软自带的计算器一算,结果是4.02*10^2567,共有2568位。在C语言中我们没有能够精确表示这个数字的数据类型。如果非要计算,那么只能以数组的形式存放每一位数字。代码不太难,如下: 1 #include 2 #include 3 4 #... 阅读全文
posted @ 2014-11-23 16:17 nipan 阅读(1127) 评论(2) 推荐(0) 编辑

点击右上角即可分享
微信分享提示