不会
查看原帖
不会
1404388
lrqSB楼主2024/9/15 08:28

#include <bits/stdc++.h>
int a, h = 0, i, c;
int b(int c) {
	for (int j = 1; j <= c; j++) {
		if (j % c == 0) {
			h++;
		}

		if (h >= 3) {
			return 3;

		}
		return h;
	}
}

using namespace std;
int main() {

	cin >> a;

	for (int i = pow(10, a); i < pow(10, a); i++) {
		c = i;

		if (b(c) == 2) {
			c = c / 10;
			h = 0;
			if (b(c) == 2) {
				c = c / 10;
				h = 0;
				if (b(c) == 2) {
					c = c / 10;
					h = 0;
					if (b(c) == 2) {
						h = 0;
						cout << i;
					}
				}
			}

		}



	}
}
2024/9/15 08:28
加载中...