я выбирал задания у которых больше всего .
надеюсь тебе это решение
1
var i:integer;
begin
for i:=2 to 100 do
if(i mod 2 = 0) then writeln(i);
end
2
Var
a: Real;
i,n: Integer;
Begin
Writeln
a:=0
for i:=1 to n do
a:= a + sgr(i);
end
Writeln
Readln
end.
6
Var
N1, N2, M, i: Longint
Begin
Write( Wwedite N1= `)
ReadLn (N2)
if (N1=0) and (N2=0) then writeLn;
if N1>N2 then M:= N1 else M:= N2;
i:=M -1;
Repeat
Inc(i);
Until ((i mod N1)=0) and ((i mod N2)=0);
WriteLn ;
end.
12.
program N99210889
const n=10
s: longint = 1
var i: byte;
begin
s: = s+ Term;
Term: = Term×2
end
writeln(s)
readln
end.
#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;
}