7 more
This commit is contained in:
16
CSES - CSES Problem Set/Trailing_Zeros.cpp
Normal file
16
CSES - CSES Problem Set/Trailing_Zeros.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
// Trailing Zeros
|
||||
|
||||
#include<bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
using ll = long long;
|
||||
|
||||
int main() {
|
||||
int count = 0;
|
||||
ll n; cin >> n;
|
||||
for (int i = 1; i <= 15; i++) {
|
||||
count += n / pow(5, i);
|
||||
}
|
||||
cout << count;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user