#define CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include<string>
#include<iostream>
using namespace std;
void findfactoralzero(long long num)
{
int count = 0,n=1;
for (int i = 5;; i = i * 5)
{
if (num / i == 0) break;
count += num/i;
}
cout <<count<< endl;
}
int main()
{
int test;
long long num;
cin >> test;
while (test--)
{
cin >> num;
findfactoralzero(num);
}
return 0;
}
#include<cstdio>
#include<string>
#include<iostream>
using namespace std;
void findfactoralzero(long long num)
{
int count = 0,n=1;
for (int i = 5;; i = i * 5)
{
if (num / i == 0) break;
count += num/i;
}
cout <<count<< endl;
}
int main()
{
int test;
long long num;
cin >> test;
while (test--)
{
cin >> num;
findfactoralzero(num);
}
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন