1 条题解
-
0
#include<bits/stdc++.h> using namespace std; #define int long long int N,M; int A[1000010],B[100010],T; signed main(){ cin>>N; A[0]=1,A[1]=1; for(int i=2;i<=sqrt(1e6);i++){ if(A[i]==0){ for(int j=i;j*i<=1e6;j++){ A[j*i]=1; } } } for(int i=1;i<=1e6;i++){ if(A[i]==0)B[++T]=i; } while(N--){ cin>>M; for(int i=1;i<=M;i++)cout<<B[i]*B[i+1]<<" "; cout<<"\n"; } return 0; }
信息
- ID
- 7285
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 73
- 已通过
- 23
- 上传者