Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d15b86c

Browse files
Create fctrl.cpp
1 parent 6ac926f commit d15b86c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎Sphere Online Judge/FCTRL/fctrl.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
// for hints, search trailing zeroes-brilliant.org
4+
5+
int main() {
6+
int t;
7+
cin>>t;
8+
unsigned long int n;
9+
while(t--){
10+
cin>>n;
11+
unsigned int count=0;
12+
for(unsigned long int i=5;i<=n;i*=5){
13+
count+=n/i;
14+
}
15+
cout<<count<<endl;
16+
}
17+
return 0;
18+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /