#include <iostream>
using namespace std;
int main() {
    int ans,a,b;
    ans=1;
    cin>>a>>b;
    for(int i=0;i<b;i++){
        ans*=a;
        ans=ans%1000;
        }
    if(ans>99)
        cout<<ans;
    else if(ans<99&&ans>9)
        cout<<"0"<<ans;
    else
        cout<<"00"<<ans;
    return 0;
}

发表评论