http://acm.nyist.net/JudgeOnline/problem.php?pid=69

View Code
 1 #include<stdio.h>
 2 #include<math.h>
 3 int main()
 4 {
 5     int t;
 6     int n;
 7     double sum;
 8     scanf("%d",&t);
 9     while(t--)
10     {
11         sum=0;
12         scanf("%d",&n);
13         for(int i=n;i>=1;i--)
14         sum+=log10(i);
15         printf("%d\n",(int)sum+1);
16     }
17 }

 

相关文章:

  • 2021-12-10
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-02-06
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2021-10-02
  • 2021-12-12
  • 2022-02-07
  • 2022-12-23
  • 2022-02-11
相关资源
相似解决方案