program raf105;
var
s,s1,s2: string;
slov,numb,i,j,l: integer;
begin
writeln('Введите строку:');
readln(s);
s:= lowercase(s);
s1:= '';
s2:= '1234567890';
while j<>-1 do
begin
j+= 1;
l+= 1;
for i:=1 to length(s1) do
if (s[j] = s1[i]) and (slov = 0)
then slov+= 1
else if (i<=length(s2)) and (s[j] = s2[i])
then numb+=1;
if s[j+1] = ' '
then j:= -1;
end;
for i:=l+1 to length(s) do
begin
if s[i] = ' '
then
begin
for j:=1 to length(s1) do
if s[i+1] = s1[j]
then slov+= 1;
end
else
begin
for j:=1 to length(s2) do
if s[i] = s2[j]
then numb+=1;
end;;
end;
writeln;
writeln('В строке:');
writeln(slov,' сл.');
writeln(numb,' циф.');
end.
Язык PascalABC
1) i=iизоб/K
i=4кб/128х128=2 бит
N=2^2=4 (цвета)
ответ: 4 цвета
2)N1=65636
N2=256
i1=2^16
i2=2^8
i1/i2=K*i1/K*i2=16/8=2
ответ:в 2 раза