<span>program delehka(input,output);
var
a:Array[1..1000010] of longint;
i,n,s,ma,mi,sl:longint;
begin
assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);
readln(n);
mi:=(1 shl 30);
ma:=-(1 shl 30);
for i:=1 to n do
begin
read(a[i]);
ma:=max(ma,a[i]);
mi:=min(mi,a[i]);
end;
if ma=mi then write(0,'',n,'',0)
else
begin
for i:=1 to n do
begin
if a[i]=ma then s:=s+1;
if a[i]=mi then sl:=sl+1;
end;
writeln(s,' ',sl,' ',n-s-sl);
close(input);
close(output);
end;
end.</span>
................................................
<span>a = int(input(</span>'input A '<span>))
b = int(input(</span><span>'input B '</span><span>))
for i in range(a,b+1):
for j in range(10):
if str(i).count(str(j)) == 3:
print(i);
Тестовое решение:
input A 1190
Input B 1500
1191
1211
1222
1311
1333
1411
1444
</span>
N=2^16
16 бит
64*10*32=20480
20480*16=327680бит
40кб