#include "iostream"
#include "stdio.h"
#include <vector>
#include <cstring>
#include <algorithm>
#include <string>
#include <string.h>
#include <stack>
#include <ctype.h>
#include <functional>
#include <math.h>
using namespace std;
//1441
int a,b;
int main(){
//freopen("input.txt","r",stdin);
while(cin>>a>>b){
if(a==0&&b==0) break;
int t=a;
a%=1000;
for(int i=0;i<b-1;i++){
a*=t;
a%=1000;
}
cout<<a<<endl;
}
return 0;
}
/**************************************************************
Problem: 1441
User: cust123
Language: C++
Result: Accepted
Time:10 ms
Memory:1520 kb
****************************************************************/
题目1441:人见人爱 A ^ B
最新推荐文章于 2020-04-10 02:56:44 发布