前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 C Buy Watermelon

The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 C Buy Watermelon

作者头像
风骨散人Chiam
发布2020-10-28 10:15:45
2740
发布2020-10-28 10:15:45
举报
文章被收录于专栏:CSDN旧文

The hot summer came so quickly that Xiaoming and Xiaohong decided to buy a big and sweet watermelon. But they are two very strange people. They are even-numbered enthusiasts. They want to cut the watermelon in two parts, and each part weighs two times as much as a kilogram .They quickly decide which melon to buy. Do you know if you want to buy this melon?

Input

Only one line contains one integer ww (1\leq w\leq 100)(1≤w≤100),units are kilograms.

Output

If it can meet the requirements, you will output YES, otherwise output NO.

样例输入复制

代码语言:javascript
复制
8

样例输出复制

代码语言:javascript
复制
YES

这个题判断能不能把这个数分成两个偶数,然后一开始以为是对半分,WA了一发,后来发现不是,那么任意分的话除了2的所有的偶数都可以。

代码语言:javascript
复制
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#define N 100010
using namespace std;
int main()
{   int w;
    cin>>w;
    if(w==2||w%2)cout<<"NO"<<endl;
    else cout<<"YES"<<endl;
}
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019/09/07 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Input
  • Output
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档