链接:https://ac.nowcoder.com/acm/problem/22014
来源:牛客网
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 32768K,其他语言65536K
64bit IO Format: %lld
空间限制:C/C++ 32768K,其他语言65536K
64bit IO Format: %lld
题目描述
群众想要吃瓜,于是给你一个瓜让你切,但是作为考验
告诉你西瓜的重量,问你能否将这个西瓜分成两部分,每个部分都是偶数。
输入描述:
输入一行,包含一个整数weight,表示西瓜的重量1 <= weight <= 100
输出描述:
输出一行,见样例。
示例1
输入
8
输出
YES, you can divide the watermelon into two even parts.
示例2
输入
3
输出
NO, you can't divide the watermelon into two even parts.
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int w; 6 cin >> w; 7 (w%2!=0 || 2==w)? // 8 (cout<<"NO, you can't divide the watermelon into two even parts.") 9 :(cout<<"YES, you can divide the watermelon into two even parts."); 10 return 0; 11 }