Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- int n, res;
- bool ri = 0;
- cin >> n;
- res = 0;
- for (int i = 1; i <= n; ++i)
- {if (i % 2 == 0)
- ri = 1;
- if (i % 5 == 0)
- {ri = 0;
- ++res;
- }
- }
- cout << res;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement