随笔分类 -  阶乘算法

求阶乘的位数和后缀0个数
摘要:结合两个公式,斯特林公式 和 后缀0个数#include #include#includeusing namespace std;const double PI=3.14159265;// 斯特林公式, 求总位数int striling(int n) { double sum=(n*log(n) - n + 0.5*log(2*n*PI))/log(10)+1;// printf("%... 阅读全文

posted @ 2020-08-06 16:06 katago 阅读(216) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

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