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

Re:运行时间太慢了,哪位大虾帮帮忙,不胜感激

Posted by 447052726 at 2010-08-18 16:16:30 on Problem 1401
In Reply To:运行时间太慢了,哪位大虾帮帮忙,不胜感激 Posted by:wgytsh at 2009-08-20 19:51:23
> #include <iostream>
> using namespace std;
> 
> int main()
> {   
> 	int countOfNumber = 0;
> 	int countOfZero = 0;
> 	long int number;
> 	cin >> countOfNumber;
> 	for(int i = 0; i < countOfNumber; i++)
> 	{
> 		cin >> number;
> 		countOfZero = 0;
> 		
>         long int tem = (number / 5);
> 		countOfZero += tem;
> 		while (tem >= 5 )
> 		{
> 			tem = (tem / 5) ;
> 			countOfZero += tem;			
> 		}
> 
> 		cout << countOfZero << endl;
> 		
> 	}
> 
> 	return 0;
> }

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