Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
时间不够,大虾救助!!#include <iostream.h> #include <math.h> void main() { int t,p;int j,k; cin>>t; double sum; for(int i=1;i<=t;i++){ sum=0; cin>>p; for(j=1;j<=p;j++) sum+=log(j); sum=sum/log(10)+1; cout<<int (sum)<<endl; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator