标签:
跟kuangbin聊过之后开始知道怎么做了,先刷着,慢慢就积累了,慢慢的就都会了,知识点也都会慢慢的积累的
先小小的试一下
big number
题目描述
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
题目描述
代码:
#include<iostream>
#include<cmath>
using namespace std;
double ju(int n){
double sum=0;
for(int i=1;i<=n;i++){
sum+=log10(i);
}
return sum;
}
int main()
{
int T,n;
cin>>T;
while(T--){
cin>>n;
cout<<(int)ju(n)+1<<endl;
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/ACWQYYY/p/4485752.html