fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. ios::sync_with_stdio(false);
  6. cin.tie(nullptr);
  7.  
  8. // freopen("input.txt", "r", stdin);
  9. // freopen("output.txt", "w", stdout);
  10.  
  11. int n, res = 0;
  12. cin >> n;
  13.  
  14. while (n > 0) {
  15. if (n % 10 == 0 || n % 10 == 5) {
  16. res++;
  17. }
  18.  
  19. n -= 7;
  20. }
  21.  
  22. cout << res;
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.04s 5308KB
stdin
100000000
stdout
2857143