3 条题解
-
0
- 1
信息
- ID
- 700
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 7
- 标签
- 递交数
- 15
- 已通过
- 9
- 上传者
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
if((n-m)/2==0){//考虑首位为0的情况
cout<<(n+m)/2<<(n-m)/2<<endl;
}
else{
cout<<(n-m)/2<<(n+m)/2<<endl;
}
return 0;
}
注册一个 HuituOJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。