40
查看原帖
40
1314528
Oscar111111楼主2024/7/23 16:42
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,x=0,sum=0;
    cin>>a>>b;
    if(a==0&&b==0) cout<<0;
    else if(a==0&&b!=0) cout<<abs(b);
    else if(a!=0&&b==0) cout<<abs(a);
    else if(a==b) cout<<abs(a);
    else if(a!=b) cout<<a+b+min(a,b);
    return 0;
}
2024/7/23 16:42
加载中...