50分求调
查看原帖
50分求调
1559343
Luochenhao88楼主2024/11/29 21:06

#2、#6、#7AC,#9、#10TLE,共50分

#include <bits/stdc++.h>
using namespace std;
long long int y,t,a;
int main(){
	cin>>y>>t;
	a=t;
	if(t==0){
		y=1;
	}else{
		for(int i=1;i<=t;i++){
			y*=a;
		}
	}
	if(y<0){
		cout<<"YES"<<"\n";
	}else{
		cout<<"NO"<<"\n";
	}
	if(y%2==1){
		cout<<"YES";
	}else{
		cout<<"NO";
	}
	return 0;
}
2024/11/29 21:06
加载中...