神奇的解法
查看原帖
神奇的解法
925943
Early_Yonth楼主2024/10/3 16:00

一年前写的代码,现在看感觉很神奇,不知道为什么能过,求助各位dalao

#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int n,m;
    cin>>n>>m;
    n=pow(n,m);
    if(n<0)
        cout<<"-1";
    else cout<<n;
    return 0;
}
2024/10/3 16:00
加载中...