A306.分糖果题解:
2026-02-09 09:24:53
发布于:四川
0阅读
0回复
0点赞
A306.分糖果
要注意:a和b都要是偶数!
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int a=n/2,b=n/2;
if(n==0){
cout << "NO";
}
else if(n/2*2==n){
if(a%2==0 && b%2==0){
cout << "YES";
}else cout << "NO";
}else cout << "NO";
return 0;
}
这里空空如也






有帮助,赞一个