fork download
  1. var
  2. a,b:array[1..1000] of integer;
  3. pom,i,j,t:INTEGER;
  4. BEGIN
  5. readln(t);
  6. for i:=1 to t do
  7. readln(a[i],b[i]);
  8. for i:=1 to t do
  9. begin
  10. pom:=a[i];
  11. for j:=1 to b[i]-1 do
  12. a[i]:=(a[i]*pom);
  13. writeln(a[i]);
  14. end;
  15. END.
  16.  
Success #stdin #stdout 0.02s 256KB
stdin
3
2 4
1 5
3 2
stdout
16
1
9