Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Ex: There are 2 trailing zeroes in 10!
- #include<stdio.h>
- int main()
- {
- long long n;
- scanf("%lld", &n);
- long long s = 0;
- while(n >= 5)
- {
- s += n / 5;
- n /= 5;
- }
- printf("%lld\n", s);
- }
Advertisement
Add Comment
Please, Sign In to add comment