#include <iostream> #include <math.h> using namespace std; int main() { int a,b; cin>>a>>b; int x=1; for(int i=1; i<=b; i++) { x *=a; x = x%1000; } if(x<10) { cout<<"00"<<x; } else if(x<100) { cout<<0<<x; } else { cout<<x; } return 0; }
注册一个 TeMenHu 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TeMenHu 通用账户