top1编程
← 返回题目
题解

【入门】判断3个整数是否满足条件

1 条题解

  • 0
    @ 2026-7-28 22:09:45
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int a,b,c,z;
    	cin>>a>>b>>c;
    	z=a+b+c;
    	if(z%2==0&&a+b>=c){
            cout<<"Yes"<<endl;
        }
    	else if(z%2!=0){
            cout<<"Bad"<<endl;
        }
    	else {
            cout<<"No"<<endl;
        }
    	return 0;
    }
    
    • 1