#include <stdio.h>
int main () {
int x, y ;
printf("x=");
scanf("%d",&x);
printf("y=");
scanf("%d",&y);
take(x,y);
}
int take (int x,int y){
int z = 1 ;
while (y>0){
z = x * z ;
y--;
}
printf("%d\n",z);
int a , b , c ;
a = z % 10 ;
b = ( z - a ) / 10 % 10 ;
c = ( z - a - 10*b ) / 100 % 10 ;
printf ( "\n后三位数字是%d%d%d\n" , c , b , a );
return 0 ;
}