2*1024 = x*128 => x = 2048/128 = 16
//PascalABC.NET
begin
for var i := 10 to 99 do
for var j := 10 to 99 do
if (i div 10 = j mod 10) and (i mod 10 = j div 10) then
writeln(i, ' ', j);
end.
Var n,i,k:integer;
begin
write('n = ');
readln(n);
k:=0;
case n of
3..9 : k:=1;
10..99 : begin
k:=1;
for i:=10 to n do
if (i mod 10 = 3)or(i div 10 = 3) then k:=k+1;
end;
100..999:begin
k:=1;
for i:=10 to 99 do
if (i mod 10 = 3)or(i div 10 = 3) then k:=k+1;
for i:=100 to n do
if (i div 100=3)or(i div 10 mod 10=3)or(i mod 10=3) then k:=k+1;
end;
end;
writeln('k = ',k);
end.
Пример:
n = 120
k = 21
5байтов займет слово 《город》
Var
a, b, i:integer;
Begin
write('Введите значения a и b: ');
read(a, b);
writeln('Цикл for');
for i := b downto a do write(i*i*i, ' ');
writeln();
writeln('Цикл while');
i := b;
while i >= a do
begin
write (i*i*i, ' ');
dec(i);
end;
writeln();
writeln('Цикл repeat');
i:=b;
repeat
write(i*i*i, ' ');
dec(i)
until i < a
writeln();
End.