AAABB AABBA ABBAA BBAAA
AABAB ABAAB ABABA BABAA BAABA BAAAB
N= 5! / (3! *2!)=5*4/2=10
const n=20;
var a:array[1..n] of integer;
i:integer;
begin
for i:=1 to n do
begin
a[i]:=random(31)-10;
write(a[i]:4);
end;
end.
Пример:
7 8 12 16 8 16 6 16 3 9 10 1 3 -1 17 -9 19 -2 1 4
Python 3.6.1:
P = 1
a = []
for i in range(10):
a.append(int(input()))
P*=a[i]
print("P =",P)
a = []
Max = 0
print("n = ",end='')
for i in range(int(input())):
a.append(int(input()))
if a[i] > a[Max]:
Max = i
print("Max =",a[Max],'[',Max,']')
Значения в таблице перемножаются