Source Code
#include <iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<set>
#include <random>
#define ll long long

using namespace std; 


int main() {

	ll n, x, y,n1,n2;
	cin >>n>> x >> y;
	n2 = n / 2 - 1;
	n1 = n / 2 + 1;
	n1 *= min(x, y);
	n2 *= max(x, y);
	cout << max(n1, n2);
}
Copy
Hurry up OthmanMaher
GNU G++17
1 ms
392 KB
Wrong Answer