#include <iostream>
typedef long long ll;
using namespace std;
bool ll_is_valid(ll t, ll N, ll x, ll y)
{
return t / x + (t - x) / y >= N;
}
ll f(ll N, ll x, ll y)
{
ll R = 1;
while (!ll_is_valid(R,N,x,y)) R *= 2;
ll L = R / 2;
while(R - L > 1)
{
ll M = (L + R) / 2;
if (!ll_is_valid(M,N,x,y)) {L = M;}
else {R = M;}
}
return R;
}
int main()
{
ll N,x,y;
cin >> N >> x >> y;
if(x > y) swap( x, y );
cout << f(N, x, y) << std::endl;
}
1.a = 3
b = 4
t = (a+b)*3
print(t)
c = 6
d = c + t
print(d)
2. а=4
b=5
a=a+b
b=a-b
a=a-b
print(a,b)
4.import math
a=float(input('Введите первый катет: '))
b=float(input('Введите второй катет: ' ))
c=str((a*b)/2)
print("Периметр: "+str(c))
d=((a+b)**2)
f=math.sqrt(d)
print("Гипотенуза равна: "+str(f))