4A Watermelon
A. Watermelon
1 second
64 megabytes
standard input
standard output
One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w kilos. They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.
Pete and Billy are great fans of even numbers, that's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos, at the same time it is not obligatory that the parts are equal. The boys are extremely tired and want to start their meal as soon as possible, that's why you should help them and find out, if they can divide the watermelon in the way they want. For sure, each of them should get a part of positive weight.
The first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.
Print YES, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and NO in the opposite case.
8
YES
For example, the boys can divide the watermelon into two parts of 2 and 6 kilos respectively (another variant — two parts of 4 and 4 kilos).
提交次数:2次
错误原因:2是偶数,但2=1+1;
#include<iostream>
using namespace std;
int main()
{
int k;
cin>>k;
==&&k!=) //2是偶数但2=1+1
{
cout<<"YES";
}
else
cout<<"NO";
}
4A Watermelon的更多相关文章
- Codeforces初体验
Codeforces印象 这两天抽时间去codeforces体验了一把. 首先,果然有众多大牛存在.非常多名人一直參加每周一次的比赛.积分2000+,并參与出题. 另外.上面题目非常多.预计至少一千题 ...
- CodeForces 4A
A A - Water~melon Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit St ...
- Watermelon -- codeforces
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=93241#problem/A (654123) http://codeforces.co ...
- code forces Watermelon
/* * Watermelon.cpp * * Created on: 2013-10-8 * Author: wangzhu */ /** * 若n是偶数,且大于2,则输出YES, * 否则输出NO ...
- 数据结构(主席树):HDU 5654 xiaoxin and his watermelon candy
Problem Description During his six grade summer vacation, xiaoxin got lots of watermelon candies fro ...
- 关于4A系统(我对4A系统的维护的理解)
4A系统 4A系统是统一安全管理平台解决方案,指认证Authentication.账号Account.授权Authorization.审计Audit,中文名称为统一安全管理平台解决方案.即将身份认证. ...
- 红米手机4A怎么样刷入开发版获得ROOT权限
小米的手机或平板不同手机型号一般情况官方都提供两个不同系统,可分为稳定版和开发版,稳定版没有提供root权限管理,开发版中就支持了root权限,在很多工作的时候我们需要使用的一些功能强大的app,都需 ...
- (简单)华为荣耀4A SCL-TL00的usb调试模式在哪里打开的方法
就在我们使用PC通过数据线连接上安卓手机的时候,如果手机没有开启Usb调试模式,PC则没办法成功检测到我们的手机,有时候,我们使用的一些功能强大的App好比之前我们使用的一个App引号精灵,老版本就需 ...
- 关于4A(统一安全管理平台)系统的理解
1. 4A系统的需求分析 近年来企业用户的业务系统发展十分迅速,内部的系统数和用户数不断增加,网络规模迅速扩大,在应用扩展的同时,各业务系统的安全管理工作相对滞后,无法满足企业发展的长期要求. 各系统 ...
随机推荐
- adsas数据库去O记
adsas 数据库是用于广告买量数据分析;在17年由 Oracle 迁移到 PostgreSQL.现把之前的迁移笔记整理下.本次迁移表91个:存储过程21个:数据库大小2G. 1. 准备Postgre ...
- 【HTML5】video 标签禁用自带的下载按钮
h5自带的 video标签 ,会有个下载按钮,有时候想避免,就可以利用样式的方法 <style type="text/css"> video::-internal-me ...
- ES6 export
一.默认导出(default export)// 1.一个模块只能有一个默认导出, 对于默认导出, 导入的名称可以和导出的名称不一致, 这对于导出匿名函数或类非常有用. <!---- page. ...
- PHP实现URL长连接转短连接方法总结
短链接,通俗来说,就是将长的URL 网址,通过程序计算等方式,转换为简短的网址字符串. 这样的话其好处为:1.内容需要:2.用户友好:3.便于管理. 实现短网址(short URL)系统比较流行的算法 ...
- ubuntu 14.04 安装python包psycopg2
http://stackoverflow.com/questions/28253681/you-need-to-install-postgresql-server-dev-x-y-for-buildi ...
- Windows 环境下 wampserver 与 phpStudy 的环境配置
一. wamperserver 1.下载好安装到本地指定目录,官网下载地址 http://www.wampserver.com 2.根据自己实际的安装路径,D:\pc\wampserver\wamp ...
- 24.redux
Flux:Flux 是一种架构思想 https://facebook.github.io/flux/ 官网 资料: http://www.ruanyifeng.com/blog/2016/01/flu ...
- web项目访问地址前添加小图片
修改HTML 1.head标签添加 <link rel="icon" type="image/x-icon" href="images/icon ...
- 对Http协议基本原理的理解
超文本传输协议 超文本传输协议(HTTP,HyperText Transfer Protocol)是互联网上应用最为广泛的一种网络传输协议,所有的WWW文件都必须遵守这个标准.设计HTTP最初的目的是 ...
- linux--- python3环境部署篇
环境部署 我们在pycharm上都是自己设置的python3解释器的环境变量,使得代码能够正常执行!可是怎么能让我们的python代码在LINUX上跑起来呢? linux是内置python,可是内置的 ...