大佬救命,一直WAITING
查看原帖
大佬救命,一直WAITING
654004
Zhouyuhan_1125楼主2022/7/27 09:11
#include <bits/stdc++.h>
using namespace std;
struct zs{
	int x,y;
};
zs a[105];
bool prime(int n){
	if(n < 2) return false;
	for(int i = 2; i * i <= n; i++){
		if(n % i == 0){
			return false;
		}
	}
	return true;
}
int main(){
	int s,x,y;
	cin >> s;
	for(int i = 0; i < s; i++){
		cin >> a[i].x >> a[i].y;
		for(int j = x; j <= y; j++){
		    if(prime(i)){
			    cout << i << endl;
		    }
		    cout << endl;
	    }
	}
	
	return 0;
}
2022/7/27 09:11
加载中...