| ||||||||||
| 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 | |||||||||
为什么会WA?#include<iostream>
using namespace std;
void ans(int num){
int a,b,t;
a=0;
b=5;
while(b<=num){
a=a+(num/b);
b=b*5;
}
cout<<a<<endl;
}
int main(void){
int times;
int num;
cin>>times;
for(int i=0;i<times;i++){
cin>>num;
if(num==0||num==1){
cout<<"1"<<endl;
}
else{
ans(num);
}
}
return 0;
}
各位帮忙看一下吧,为什么会WA,谢谢了.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator