Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

时间不够,大虾救助!!

Posted by cpp050700448084 at 2005-04-03 19:27:19 on Problem 1423
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator