第一节 练习26
程序员文章站
2024-03-11 19:38:31
...
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
int a,b;
long long c;
cout << "输入:";
cin >> a >> b;
c = (long long)pow(a,b) % 1000; //pow返回double!!!太精确了啊
//在强转面前,不堪一击
//printf("%03lld",c); //long long配合%lld
cout << c;
return 0;
}
//cout << "输入:";