Program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses System.Math, System.SysUtils;
Var
n, x, k: Integer;
S: Extended;
begin
try
{ TODO -oUser -cConsole Main : Insert code here }
S := 0;
Write('Введите n: ');
Readln(n);
Write('Введите x: ');
Readln(x);
for k := 1 to n do
S := S + (Power(x, Power(k, x)) / k);
Writeln('Сумма = ', S);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
Readln;
end.