工大后院

 找回密码
 加入后院

扫一扫,访问微社区

QQ登录

只需一步,快速开始

搜索
查看: 938|回复: 3

[数学题]zju_1526

[复制链接]
发表于 2005-7-23 23:23 | 显示全部楼层 |阅读模式
Big Number
Time limit:
10 Seconds   
Memory limit:
32768K   
Total Submit:
4849   
Accepted Submit:
2040   
In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you have to determine the number of digits in the factorial of the number.
Input
Input consists of several lines of integer numbers. The first line contains an integer n, which is the number of cases to be tested, followed by n lines, one integer 1 <= n <= 10^7 on each line.

Output
The output contains the number of digits in the factorial of the integers appearing in the input.
Sample Input
2
10
20
Sample Output
7
19
Submit
   
Back
   
Status

[ Last edited by sheep426 on 2005-7-25 at 09:32 ]
 楼主| 发表于 2005-7-23 23:24 | 显示全部楼层
Stirling found the following formula for approximating factorials:

and more precisely,
回复

使用道具 举报

发表于 2005-7-24 08:10 | 显示全部楼层
有公式
回复

使用道具 举报

 楼主| 发表于 2005-7-25 09:18 | 显示全部楼层
loga(MN)=logaM + logaN
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入后院

本版积分规则

QQ|Archiver|手机版|小黑屋|广告业务Q|工大后院 ( 粤ICP备10013660号 )

GMT+8, 2024-6-6 13:12

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表