| ||||||||||
| 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 | |||||||||
Re:运行时间太慢了,哪位大虾帮帮忙,不胜感激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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator