Ogro

Problem Link

Solution by augusto100 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


« Back to problem