Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int cnt = 0, max = 0;
- for (int i = 1017; i <= 7935; i++) {
- if (i % 3 == 0 && i % 7 != 0 && i % 17 != 0 && i % 19 != 0
- && i % 27 != 0) {
- cnt++;
- max = i;
- }
- }
- cout << cnt << endl << max;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement