var
n,i: integer;
st: string;
k,j,v,code: integer;
sum: real;
begin
writeln('vvedite n');
readln(n);
str(n,st);
j:= 3;
for i:=1 to length(st) do
begin
val(st[i],v,code);
sum:= (k * exp(3*ln(i)));
end;
writeln(sum);
readln;
end
var
n, ost: integer;
s: string;
begin
write('n = '); readln(n);
s := '';
while n >= 3 do begin
ost := n mod 3;
case ost of
0: s := '0' + s;
1: s := '+' + s;
2: s := '+-' + s;
end;
n := n div 3;
end;
case n of
0: s := '0' + s;
1: s := '+' + s;
2: s := '+-' + s;
end;
writeln('s(3) = ', s);
end.
var
s: string;
base, n, i: integer;
begin
write('s(3) = '); readln(s);
base := 1; n := 0;
for i := length(s) downto 1 do begin
case s[i] of
'0': ;
'+': n := n + base;
'-': n := n - base;
end;
base := base * 3;
end;
writeln('n(10) = ', n);
end.