1090: 整数幂(多实例测试)
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int t=cin.nextInt();while(t--!=0){
int a=cin.nextInt();int b=cin.nextInt();int result=1;for(int i=1;i<=b;i++) result=result*a%1000;System.out.println(result);}}
}