Ogro
Problem LinkSolution by augusto — 100 pts
Code / Notes
#include <iostream>
using namespace std;
int main() {
int E, D;
cin >> E >> D;
if (E > D) {
cout << E + D << endl;
} else {
cout << 2 * (D - E) << endl;
}
return 0;
}
Last updated 1 month, 3 weeks ago