Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #define long long long
- #define nln '\n'
- int main()
- {
- long n;
- scanf("%lli", &n);
- long fiv = 1, res = 0;
- while (fiv <= n){
- fiv *= 5;
- res += n / fiv;
- }
- printf("%lli\n", res);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment