Code for USACO practice problems
cpp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
196 B

#include <cmath>
#include <iostream>
using namespace std;
int main() {
long n;
cin >> n;
int a = 0;
for (int i = 0; i < 100; i++) {
a += floor(n / pow(5, i + 1));
}
cout << a;
}