1.
а)
var a, b: integer;
read(a, b);
writeln((a + b) / 2);
б)
var a, b, c, d, e: integer;
read(a, b,c, d, e);
writeln(a*a, b*b, c*c, d*d, e*e);
в) Не знаю это.
д) Решето Эратосфена.
2)
а)
array [1..n] of integer;
var c: integer;
c := 1;
read(n);
while //запускаем цикл для ввода значений массива и подсчёта произведения
read(a[n]);
c = c * a[n];
end;
writeln(c);
б)
array [1..n] of integer;
var c: integer;
read(a[0]);
c := a[0];
while //запускаем цикл для ввода значений массива и определения максимального элемента
read(a[n]);
if {
c > a[n];
} then c := a[n];
end;
writeln(c);
в)
array [1..n] of integer;
var c: integer; //переменная-счётчик
while //запускаем цикл для ввода значений массива и определения количества отрицательных чисел
if {
a[n] < 0;
} then c := c + 1;
end;
writeln(c);
г)
array [1..n] of integer;
var c: integer; //переменная-счётчик
while //запускаем цикл с позиции a[1] для ввода значений массива и определения количества искомых элементов
if {
a[n] = a[0];
} then c := c + 1;
end;
writeln(c);
x, y = map(float, input().split())
# f - формула
f1 = f2 = f3 = f4 = False
F1 = (x-4)*(x-4) + (y-4)*(y-4)
F2 = x*x + (y-3)*(y-3)
F3 = (x-3)*(x-3)+y*y
if (x * x + y * y <= 25) and (x * x + y * y >= 9):
f1 = True
if ((x * x + y * y <= 25) and (y > x + 5)) or ((x * x + y * y <= 25) and (y < x - 5)) \
or ((x * x + y * y <= 25) and ((x > 0 and y > 0) or (x < 0 and y < 0))):
f2 = True
if F1 == 9 or F2 == 9 or F3 == 9 or ((F1 <= 9 and F2 > 9 and F3 > 9) or (F2 <= 9 and F1 > 9 and F3 > 9) or (F3 <= 9 and F1 > 9 and F2 > 9)):
f3 = True
if (x * x + (y - 3) * (y - 3) <= 16) and (y <= 2 or y >= 5):
f4 = True
print("1:", f1)
print("2:", f2)
print("3:", f3)
print("4:", f4)
11
Объяснение:
660/60