1010111₂ = 127₈
4576₈ = 2430₁₀
16AC₁₆ = 1011010101100₂
11101₂ * 110₂ = 10101110₂
1011110₂ - 101₂ = 1011001₂
1001₂ + 1010₂ = 10011₂
Объяснение:
1010111₂ = 1*2⁰ + 1*2¹ + 1*2² + 0*2³ + 1*2⁴ + 0*2⁵ + 1*2⁶ = 87₁₀
87₁₀ = 7*8⁰ + 2*8¹ + 1*8² = 127₈
4576₈ = 6*8⁰ + 7*8¹ + 5*8² + 4*8³ = 2430₁₀
16AC₁₆ = C*16⁰ + A*16¹ + 6*16² + 1*16³ = 5804₁₀
5804₁₀ = 0*2⁰ + 0*2¹ + 1*2² + 1*2³ + 0*2⁴ + 1*2⁵ + 0*2⁶ + 1*2⁷ + 0*2⁸ + 1*2⁹ + 1*2¹⁰ + 0*2¹¹ + 1*2¹² = 1011010101100₂
11101₂ = 1*2⁰ + 0*2¹ + 1*2² + 1*2³ + 1*2⁴ = 29₁₀
110₂ = 0*2⁰ + 1*2¹ + 1*2² = 6₁₀
174₁₀ = 0*2⁰ + 1*2¹ + 1*2² + 1*2³ + 0*2⁴ + 1*2⁵ + 0*2⁶ + 1*2⁷ = 10101110₂
1011110₂ = 0*2⁰ + 1*2¹ + 1*2² + 1*2³ + 1*2⁴ + 0*2⁵ + 1*2⁶ = 94₁₀
101₂ = 1*2⁰ + 0*2¹ + 1*2² = 5₁₀
89₁₀ = 1*2⁰ + 0*2¹ + 0*2² + 1*2³ + 1*2⁴ + 0*2⁵ + 1*2⁶ = 1011001₂
1001₂ = 1*2⁰ + 0*2¹ + 0*2² + 1*2³ = 9₁₀
1010₂ = 0*2⁰ + 1*2¹ + 0*2² + 1*2³ = 10₁₀
19₁₀ = 1*2⁰ + 1*2¹ + 0*2² + 0*2³ + 1*2⁴ = 10011₂
var
i:integer;
n,col:longint;
a:array[1..3] of integer;
b:array[0..9] of integer;
procedure rec(t:integer);
var i:integer;
begin
if t=4 then begin
inc(col);
for i:=1 to 3 do
write(a[i]);
writeln();
exit;
end;
for i:=0 to 9 do
if b[i]>0 then begin
dec(b[i]);
a[t]:=i;
rec(t+1);
inc(b[i]);
end;
end;
begin
write('Число: ');
read(n);
while(n>0) do begin
inc(b[n mod 10]);
n:=n div 10;
end;
for i:=1 to 9 do
if b[i]>0 then begin
a[1]:=i; dec(b[i]);
rec(2);
inc(b[i]);
end;
writeln('Количество: ', col);
end.