Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
40942 Andrew宥杨 找素数(蓝桥杯2012决赛第1题) C++ 运行超时 1000 MS 228 KB 247 2024-02-18 11:30:15

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main(){ int cnt=0,k=2,flag=1; while(cnt<100002){ for(int i=2;i<k;i++){ if(k%i==0)flag=0; } if(flag)cnt++; flag=1; if(cnt==100002)break; k++; } cout<<k; return 0; }


测评信息: