ans

wurenchao 2022-09-12 18:38:59 6 返回题目

#include <bits/stdc++.h>

using namespace std;

int main() {

int n;

cin >> n;

for (int i = 23; i <= n; i += 5)//减少时间复杂度

    if (i % 3 == 2 && i % 5 == 3 && i % 7 == 2)

        cout << i << endl;

return 0;

}

{{ vote && vote.total.up }}