提交记录 9111
| 提交时间 |
评测时间 |
| 2019-04-10 19:12:20 |
2020-08-01 01:31:59 |
#include<bits/stdc++.h>
using namespace std;
const int N=260000;
bool vis[260000];
int main()
{
for(int i=2;i*i<=N;i++){//将i<=N换成i*i<=N
if(!vis[i]){
int mul;//倍数
i==2?mul=1:mul=2;
for(int j=i*i;j<=N;j=j+i*mul){//将2*i换成i*i
vis[j]=1;
}
}
}
int t;
cin>>t;
int a,b;
while(t--)
{
cin>>a>>b;
cout<<a+b<<endl;
}
return 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 268.16 us | 288 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-04-04 19:40:39 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠