我这为啥错呀
查看原帖
我这为啥错呀
788424
evil_paramecium楼主2023/7/11 09:32
#include<bits/stdc++.h>
using namespace std;
int n;
int i=1;
int main(){
	cin>>n;
	for(;n>0;i++){
		int j=2;
		while(i%j!=0 and n>=j){
			i++;
		}
		if(i==j){
			n-=1;
		}
	}
	cout<<i;
	return 0;
}

输入

10

输出

无

2023/7/11 09:32
加载中...