-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFCTRL.cpp
More file actions
48 lines (43 loc) · 905 Bytes
/
FCTRL.cpp
File metadata and controls
48 lines (43 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include<bits/stdc++.h>
using namespace std;
// Shubhank Khare
#define MOD 1000000007
#define VALUEIN
#ifdef VALUEIN
#define valuein(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define valuein(...)
#endif
static auto _ = []()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
return nullptr;
}();
int main(void) {
long long int n,nt=0,total=0,div=5;
long long int t;
scanf("%lld",&t);
while(t--)
{
nt=0;
total=0;
div=5;
scanf("%lld",&n);
while(div<=n)
{
total=total+n/div;
div=div*5;
}
printf("%lld\n",total);
}
return 0;
}