Ответ:
import itertools
def antipalindrom():
with open('input.txt', 'r') as file:
line = file.read()
array = []
antpal = []
for i in range(len(line)):
i+=1
array.append(list(itertools.combinations(line, i))[0])
array = [(lambda i: ''.join(i))(i) for i in array]
for item in array:
if item != item[::-1]:
antpal.append(item)
with open('output.txt', 'w') as f:
if not antpal:
f.write('NO SOLUTIONS')
else:
f.write(antpal[-1])
antipalindrom()
Объяснение:
Python 3.7
tg = @Fr0DK
//PascalABC.NET
//Версия 3.4.2
begin
range(1,ReadInteger('n=')).Where(x->x.IsEven).Println;
end.
1). Здесь возможны 2 варианта:
if A>10 then a:=a+2 else
if A>10 then else a:=a+2
2)
<span>__ a:= 23 div 10 +10 - </span>3) 12<span>
__ b:= a mod 5 +1 - </span>4) 3<span>
__ c:= sqr(b) - </span>1) 9<span>
__ d:= c *5/3 - </span>2) 15
Program arr;
var
a: array[1..15] of integer;
count,count_odd,num,sum,mult: integer;
begin
count := 1;
count_odd := 1;
num := 3;
sum := 0;
mult := 1;
while count <= 15 do
begin
a[count] := num;
count := count + 1;
num := num + 3;
end;
while count_odd <= 15 do
begin
sum := sum + a[count_odd];
mult := mult * a[count_odd];
count_odd := count_odd + 2;
end;
writeln('Массив из 15 элементов: 3, 6, 9, ..., 45');
writeln('Сумма элементов с нечетными индексами: ', sum);
writeln('Произведение элементов с нечетными индексами: ', mult);
end.
5 градусов
наивысшая точка 6, наименьшая 1. Разность равна 5