№1

№1

cannor147
#include <iostream>
using namespace std;

int main() {
int x, y, ans;
cin >> x >> y;
if (x == y || y == 0){
ans = 3;
}else{
if (x - y > 2 || y - x > 2){
ans = x + 3 * y;
}else{
ans = 5 * x / y;
}
}
cout << ans;
return 0;
}

Report Page