Https://www.teacherspayteachers.com/Product/Watch-Online-Trolls-World-Tour-2020-Full-Movie-Free-Download-5532765
https://www.teacherspayteachers.com/Product/Watch-Online-Blue-Story-2020-Full-Movie-Free-Download-5532773
https://www.teacherspayteachers.com/Product/WatchMy-Hero-Academia-Heroes-Rising-2020-Full-Movie-Free-Download-5532779
https://www.teacherspayteachers.com/Product/Watch-Online-365-Dni-365-Days-2020-Full-Movie-Free-Download-5532790
https://www.teacherspayteachers.com/Product/Watch-Avengers-Endgame-Online-Full-Movie-Free-Download-5532797
#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;
}
begin
var n:=ReadInteger('Количество элементов в массиве: ');
var a:=ArrRandom(n,-50,50);
a.Println(',');
Writeln('Четные элементы: ');
var i:=1;
while i<n do begin Write(a[i],' '); Inc(i,2) end;
Writeln;
Writeln('Нечетные элементы: ');
i:=0;
while i<n-1 do begin Write(a[i],' '); Inc(i,2) end;
Writeln
end.
Тестовое решение:
Количество элементов в массиве: 10
15,-18,-29,-25,46,21,-8,-17,-9,15
Четные элементы:
-18 -25 21 -17 15
Нечетные элементы:
15 -29 46 -8 -9