acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 竞赛
  • 讨论
  • 团队
登录
注册
题目详情提交记录(0)
  • #题解来了

    #include<bits/stdc++.h> using namespace std; long long n,m,t; int main(){ cin >> n >> m; t = pow(n,m); if(t<=1000000000&&t>=0){ cout << t; }else{ cout << -1; } return 0; }

    userId_undefined

    永盼

    出道萌新时空双修者秩序白银快乐小狗
    0阅读
    0回复
    0点赞
  • 1ms过

    userId_undefined

    ><

    倔强青铜
    0阅读
    0回复
    0点赞
  • 嗯

    userId_undefined

    188****7602

    0阅读
    0回复
    0点赞
  • 简单

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

    userId_undefined

    DST

    空间掌握者倔强青铜模拟·模拟练习生
    0阅读
    0回复
    0点赞
  • 666

    userId_undefined

    耐高总冠军 张文杰

    0阅读
    0回复
    0点赞
  • 题解如下

    #include <iostream> #include<cmath> using namespace std; int main(){ long long a,b,sum=0; cin>>a>>b; if(pow(a,b)>1000000000){ cout<<"-1"; }else{ sum=pow(a,b); cout<<sum; } }

    userId_undefined

    周泽峰

    0阅读
    0回复
    0点赞
  • 6

    #include<bits/stdc++.h> using namespace std; int main(){ long long a,b,m,n; n=pow(10,9); cin>>a>>b; m=pow(a,b); if(m>n||m<0){ cout<<-1; }else{ cout<<m; } return 0; }

    userId_undefined

    只莹

    0阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    准

    出道萌新倔强青铜
    0阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    刘鑫昊

    0阅读
    0回复
    0点赞
  • sss

    #include<bits/stdc++.h> using namespace std; int main(){ long long a,b,ans=1; cin>>a>>b; for(int i=1;i<=b;i++){ ans*=a; if(ans>1000000000){ cout<<"-1"; return 0; } } cout<<ans; return 0; }

    userId_undefined

    霄

    时空双修者荣耀黄金
    0阅读
    0回复
    0点赞

共70条

  • 1
  • 2
  • 3
  • 4
20条/页
跳至页
暂无数据

提交答案之后,这里将显示提交结果~

首页