这个题一看就是要判断奇数偶数。 但是,有一个特殊情况:2
2虽然是偶数,但是他却能分成1+1,两个奇数相加
要考虑这个特殊情况!
using namespace std;
int main()
{
int weight=0;
cin>>weight;
if(weight>=1&&weight<=100)
{
if(weight%2==1||weight==2)
cout<<"NO, you can't divide the watermelon into two even parts."<<endl;
else
cout<<"YES, you can divide the watermelon into two even parts."<<endl;
}
}