题解 | #CSimplemathproblem#
CSimplemathproblem
https://ac.nowcoder.com/acm/contest/19304/E
#include<iostream>
using namespace std;
int main()
{
long x=0;
long y=0;
cin>>x>>y;
if(y%x==0) cout<<x+y<<endl;
else cout<<y-x<<endl;
}
CSimplemathproblem
https://ac.nowcoder.com/acm/contest/19304/E
#include<iostream>
using namespace std;
int main()
{
long x=0;
long y=0;
cin>>x>>y;
if(y%x==0) cout<<x+y<<endl;
else cout<<y-x<<endl;
}
相关推荐