type a = array[0..999] of Integer; var B, num: a; var N, k: integer;
procedure SimpleNumber(B: a); begin for var i := 0 to N-1 do begin for var j := 2 to 9 do begin if B[i] mod num[j] <> 0 then k += 1; end; if k = 8 then begin write('Есть простое число'); break; end else if (k <> 8) and (i = N-1) then write('Нет простых чисел'); k := 0; end; end;
begin for var i := 2 to 9 do begin num[i] := i; end; read(N); for var i := 0 to N-1 do read(B[i]); SimpleNumber(B); end.
#include <iostream>
using namespace std;
double y(double a, double b, double c, double x) {
if (c == x && b + c + x != 0)
return ((a + b) * (a + c) * (a + x)) / (b + c + x);
if (c != x && 1 + b != 0 && 1 + a != 0 && a / (1 + b) + b / (1 + a) >= 0)
return sqrt(a / (1 + b) + b / (1 + a));
return -1e9 - 7;
}
signed main() {
double a, b, c, x, ans;
cin >> a >> b >> c >> x;
ans = y(a, b, c, x);
ans == -1e9 - 7 ? cout << "No solution" : cout << ans;
}
type a = array[0..999] of Integer;
var B, num: a; var N, k: integer;
procedure SimpleNumber(B: a);
begin
for var i := 0 to N-1 do begin
for var j := 2 to 9 do begin
if B[i] mod num[j] <> 0 then
k += 1;
end;
if k = 8 then begin
write('Есть простое число');
break;
end
else if (k <> 8) and (i = N-1) then
write('Нет простых чисел');
k := 0;
end;
end;
begin
for var i := 2 to 9 do begin
num[i] := i;
end;
read(N);
for var i := 0 to N-1 do
read(B[i]);
SimpleNumber(B);
end.