> #include <iostream>
> using namespace std;
>
> int main() {
> // your code goes here
> long long t;
> cin>>t;
> while(t--){
> long long a,c=0;
> cin>>a;
> while(a>0){
> c+=a/5;
> a=a/5;
> }
> /* for(long long i=5;i<a;i*=5){
> c+= a/i;
> }*/
> cout<<c<<endl;
> }
>
> return 0;
> }
Why is the while loop working but the for loop is showing “wrong answer”?