| 比赛 | CSP2022普及组 | 评测结果 | WWAWWAAAAA |
|---|---|---|---|
| 题目名称 | 乘方 | 最终得分 | 60 |
| 用户昵称 | Coconut | 运行时间 | 2.884 s |
| 代码语言 | C++ | 内存使用 | 1.72 MiB |
| 提交时间 | 2022-10-29 17:07:46 | ||
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("csp2022pj_pow.in","r",stdin);
freopen("csp2022pj_pow.out","w",stdout);
double a,b;
int m;
cin>>a>>b;
int c=a;
for(int i=2;i<=b;i++)
{
a=a*c;
}
if(a>1000000000)
{
cout<<"-1";
}
else
{
cout<<a;
}
return 0;
}