Codeforces - 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.
Input8
Output
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).
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
题意:分开的两部分都是正偶数输出YES,否则输出NO
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int w;
cin>>w;
==&&w!=)
{
cout<<"Yes"<<endl;
}
else
{
cout<<"No"<<endl;
}
;
}
Codeforces - A. Watermelon的更多相关文章
- Watermelon -- codeforces
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=93241#problem/A (654123) http://codeforces.co ...
- Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon 水题
A. Watermelon 题目连接: http://www.codeforces.com/contest/4/problem/A Description One hot summer day Pet ...
- codeforces水题100道 第二题 Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon (math)
题目链接:http://www.codeforces.com/problemset/problem/4/A题意:一个整数能否表示成两个正偶数的和.C++代码: #include <cstdio& ...
- Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon【暴力/数学/只有偶数才能分解为两个偶数】
time limit per test 1 second memory limit per test 64 megabytes input standard input output standard ...
- Codeforces - Watermelon
A. Watermelon time limit per test 1 second memory limit per test 64 megabytes input standard input o ...
- CodeForces 4A
A A - Water~melon Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit St ...
- Codeforces初体验
Codeforces印象 这两天抽时间去codeforces体验了一把. 首先,果然有众多大牛存在.非常多名人一直參加每周一次的比赛.积分2000+,并參与出题. 另外.上面题目非常多.预计至少一千题 ...
- python爬虫学习(5) —— 扒一下codeforces题面
上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...
- 【Codeforces 738D】Sea Battle(贪心)
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...
随机推荐
- 2019-1-29-win10-uwp-使用-Microsoft.Graph-发送邮件
title author date CreateTime categories win10 uwp 使用 Microsoft.Graph 发送邮件 lindexi 2019-01-29 16:36:3 ...
- BZOJ 2160: 拉拉队排练(回文树)
传送门: [1]:BZOJ [2]:洛谷 •题意 求串 s 中出现的所有奇回文串,并按照长度由大到小排序: 输出前 k 个奇回文串的乘积 mod 19930726; 如果奇回文串的个数不足 k 个,输 ...
- 【u236】火炬
Time Limit: 1 second Memory Limit: 128 MB 2008北京奥运会,你想成为四川汶川的一名火炬手,结果层层选拔,终于到了最后一关,这一关是一道很难的题:任意给定一个 ...
- cookie小总结
对cookie总结 cookie 在服务器的环境下,对数据的本地存储下面为一个小小的案例 let d= new Date; d.setDate(d.getDate()+7); document.coo ...
- JQ ajaxFileUpload的一些问题
1.input之后没法再次获得响应事件,change无效 解决办法,对file这个Input的父级做响应事件. <div class="lineBox lineBox0_24 line ...
- vue中的时间修饰符stop,self
stop阻止自身以外的冒泡 self只会阻止自身冒泡
- Jquery Validate表单验证,自定义校验正整数
// 添加自定义校验规则,校验正整数 jQuery.validator.addMethod("positiveinteger", function(value, element) ...
- 很多.net 程序员不知道又非常重要的 .net高级调试技巧.调试别人的dll方法内的变量
事情是这样的, 最近需要开发Orcale的数据库. 于是使用了EF 加上 Oracle.ManagedDataAccess.Client 这个Oracle.ManagedDataAccess 很好用, ...
- Vsual Studio 2010可用的sqlite驱动程序(实体数据模型使用)
背景 昨天一个旧的项目(.net framework 4 + EF4 +sqlite + edmx db first),数据库结构有变更,要更新实体edmx模型 先是到官网下载最新的驱动,结果不能更新 ...
- Ubuntu14.04虚拟机下基本操作(typical安装)
1.打开终端:ctrl+alt+T 2.图形桌面和命令行界面切换:Ctrl+Alt+F1和Ctrl+Alt+F7 3.切换到root用户:激活前,sudo su+回车: 激活后,su+回车. 切换回 ...