1)x-y=11000
110101
- 11101
11000
2)х+у=1010010
110101
+ 11101
1010010
256000 бит / 8 = 32000 байт
var
inStr, outStr : string;
i : integer;
begin
outStr := '';
ReadLn(inStr);
for i := 1 to Length(inStr) do
<span> if </span>inStr[i] <> '+' then
outStr := outStr + inStr[i] + inStr[i];
WriteLn(outStr);
end.
№2
var d, n, i: integer;
begin
d:=1;
n:=24 div 3;
for i:= 1 to n do
begin
d:=d*2;
writeln('Количество амеб через ', i*3, ' часов: ', d);
end;
<span>end.</span>
<span><span>234567891011121314151617181920212223</span><span><span>procedure CountingSort(var X: array of integer; min, max: integer);</span>var<span> counter: array[0..100000] of integer;</span><span> i, j, index: Integer;</span>begin<span> // для всех элементов массива</span><span> // указываем значение ноль</span><span> for i:=0 to high(counter)</span><span> do tmpX[i]:=0;</span><span> for i:=min to max</span><span> do counter[ar[i]]:=counter[ar[i]]+1;</span><span> // устанавливаем значение</span><span> // в правильную позицию</span><span> index:=min;</span><span> for i:=min to high(counter)-1 do</span><span> begin</span><span> for j:=0 to counter[i]-1 do</span><span> begin</span><span> ar[index]:=i;</span><span> index:=index+1;</span><span> end;</span><span> end;</span><span>end<span>;</span></span></span></span>