Gravatar
awa
积分:10
提交:12 / 46
终于对了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

题目 3777 [CSP 2022J]乘方
2024-10-17 21:55:29
Gravatar
不知所云
积分:29
提交:12 / 134
#include<bits/stdc++.h>
using namespace std;
typedef long long op;
int main()
{
freopen("csp2022pj_pow.in","r",stdin);freopen("csp2022pj_pow.out","w",stdout);
op a,b;
cin>>a>>b;
if(pow(a,b)>1000000000)cout<<-1;
else cout<<(int)pow(a,b);
return 0;
}

题目 3777 [CSP 2022J]乘方
2024-10-02 21:44:15
Gravatar
回归运动
积分:59
提交:47 / 125
#include<bits/stdc++.h>
using namespace std;
int main()
{freopen("csp2022pj_pow.in","r",stdin);
freopen("csp2022pj_pow.out","w",stdout);
int a,b;
cin>>a>>b;
if(pow(a,b)<1000000000) cout<<int(pow(a,b));
else cout<<"-1";
fclose(stdin);fclose(stdout);
return 0;}

Gravatar
father
积分:79
提交:35 / 85
666

Gravatar
王马
积分:58
提交:26 / 71
#include <bits/stdc++.h>
#include<map>
using namespace std;
struct nxx {
int cost;
int pc;
string st;
bool operator < (const nxx &tmp)const {
return this->pc > tmp.pc ;
}
nxx (int a,int b,string c) {
pc=a;
cost=b;
st=c;
}
};
int x,y;
map <string, bool> mp;
map <string, int> dis;
int dx[4] = {0, 1, -1, 0};
int dy[4] = {1, 0, 0, -1};
string s;
char goal[10]="123804765";
int mubiao;
int gj(string jntm) {
int ans = 0;
for (int i = 0; i < 9; i ++ ) {
if (goal[i] != jntm[i] && goal[i] != 0) ans

题目 3777 [CSP 2022J]乘方
2024-07-09 17:11:12