【题目描述】
【输入】
【输出】
【输入样例】
10
【输出样例】
#include<iostream> #include<cmath> using namespace std; int main(){ int n,p=1,s=2,flag; cin>>n; while(p<n){ s++; flag=1; for(int i=2;i<=int(sqrt(s));++i){ if(s%i==0){ flag=0; break; } } if(flag)p++; } cout<<s; return 0; }//OK
Powered by 孙会中 @ 2024-2026【 www.sunhuizhong.cn 】All rights reserved
访问统计:386183 本月:281 上月:799 今日:7 昨日:6 当前在线:1人