提交记录 9114


用户 题目 状态 得分 用时 内存 语言 代码长度
zhouxiang 1000i. 【传统题】 A+B Problem Accepted 100 535.58 us 320 KB C++11 448 B
提交时间 评测时间
2019-04-10 19:42:31 2020-08-01 01:31:59
#include<bits/stdc++.h>
using namespace std;
int v[65000], prime[65000], tot=0;
const int n=65000;
int main()
{
   tot=0;
   for (int i=2; i<=n; i++)
   {
      if (!v[i]) {v[i]=i; prime[++tot]=i;}
      for (int j=1; j<=tot; j++)
      {
         if (prime[j]>v[i] || prime[j]> n/i) break;
         v[i*prime[j]]=prime[j];
      }
   }
   int t;
   cin>>t;
   int a,b;
   while(t--)
   {
      cin>>a>>b;
      cout<<a+b<<endl;
   }
   return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1535.58 us320 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2026-04-04 19:45:59 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠