program CalculateSum;
varn, i: Integer;sum: LongInt;
beginsum := 0;
write('Enter the value of n: ');readln(n);
for i := 1 to n dobeginsum := sum + Round(Power(i, i));end;
writeln('The sum is: ', sum);end.
program CalculateSum;
var
n, i: Integer;
sum: LongInt;
begin
sum := 0;
write('Enter the value of n: ');
readln(n);
for i := 1 to n do
begin
sum := sum + Round(Power(i, i));
end;
writeln('The sum is: ', sum);
end.