Guest User

Untitled

a guest
May 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. long long ans = 0;
  4. int func(int num) {
  5. if (num % 5 == 0) {
  6. ans++;
  7. return func(num / 5);
  8. }
  9. }
  10.  
  11. int main() {
  12. long long n, i, temp;
  13. cin >> n;
  14. for (i = 1; i <= n; i++) {
  15. temp = func(i);
  16. }
  17.  
  18. cout << ans << '\n';
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment