#include<iostream>
using namespace std;
int main()
{
int x,y;
int i=0;
char str[2];
cout<<"Input x and y(x**y):";
cin>>x>>str[1]>>str[2]>>y;
int last=1;
for(;i<y;i++)
{
last=last*x%1000;
}
cout<<"The last three digits of "<<x<<"**"<<y<<"is "<<last<<endl;
return 0;
}
//高次幂的尾数
最新推荐文章于 2023-12-24 15:28:57 发布