全部评论 1

  • #include<bits/stdc++.h>
    using namespace std;
    int main(){
        unsigned int a,b;
        cin>>a>>b;
        if(pow(a,b)>INT_MAX)
            cout<<(-1);
        else
            cout<<int(pow(a,b));
        return 0;
    }
    

    这样更简单

    2024-11-30 来自 广东

    0
首页