提交记录 6172


用户 题目 状态 得分 用时 内存 语言 代码长度
Sakuya 1000. 测测你的 A+B Compile Error 0 0 ns 0 KB C++ 313 B
提交时间 评测时间
2018-10-01 20:03:35 2020-08-01 00:40:02
#include<cstdio>
using namespace std;
int a,b,c;
 int main(){long long l=-int(1e9)<<1,r=int(1e9)<<1;//左边界和右边界
     scanf("%d%d",&a,&b);
     while(r-l>1){c=(l+r)>>1;//二分的步骤啦
         if(c-b<a)l=c;
         else if(c-b>a)r=c;
             else return printf("%d\n",c),0;
     }if(l!=r)return printf("%d\n",r),0;
 }

CompilationN/AN/ACompile ErrorScore: N/A


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