problem link, hey please see if i am doing right in this code written in Pascal FPC
program ZEROES;
uses Math;
var
T,N,x:integer;
result:longint;
function calculate(num:integer):longint;
begin
for x := 1 to N do
begin
result := result*intpower(x,x);
end;
calculate := result;
end;
begin
read(T);
while T <> 0 do
begin
readln(N);
result := 1;
writeln(calculate(N));
T := T-1;
end;
end.