#include<bits/stdc++.h>
using namespace std;
int main()
{
int l,all = 0,x = 2,j = 0,y = 0,a[100005];
cin>>l;
while(all<l)
{
x++;
for(int i = 1;i<=x;i++)
{
if(x%i == 0)
{
j++;
}
}
if(j == 2)
{
all+=x;
a[y] = x;
y++;
}
j = 0;
}
for(int i = 0;i<y-1;i++)
{
cout<<a[i]<<" ";
}
cout<<endl;
cout<<y<<endl;
return 0;
}
这是我的代码,给我报WA
ε=(´ο`*)))唉好闹心,求各位大佬帮助