xingchen_wzt @ 2024-06-29 11:34:40
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,q,k[1000005],v[n+5];cin>>n>>q;
for(int i=1;i<=q;i++)cin>>k[i];
for(int i=2;i<=n-1;i++){
for(int j=2;j<=n-1;j++){
if(i%j==0)break;
v[i-1]={i};
}
}
for(int i=1;i<=q;i++)cout<<v[k[i]];
}
(>^<)
by xingchen_wzt @ 2024-06-29 14:50:11
@ToMaT 已关