求助四十分
查看原帖
求助四十分
607528
Cokewithice楼主2023/10/8 18:40
#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std; 
int y,t,ans=0;
int main(int argc, char** argv) {
	cin>>y>>t;
	ans=y;
	if(t==0)
	{
		y=1;
		cout<<"NO"<<endl;
		cout<<"YES"<<endl;
	}
	else 
	{
		for(int i=1;i<=t;i++)
		{
			y*=ans;
		}
	}
	if(y>=0)
	{
		cout<<"NO"<<endl;
	}
	else
	{
		cout<<"YES"<<endl;
	}
	if(y%2==0)
	{
		cout<<"NO"<<endl;
	}
	else
	{
		cout<<"YES"<<endl;
	}
	return 0;
}

rt

2023/10/8 18:40
加载中...