Codeforces 4A
来源:互联网 发布:三菱中性笔 知乎 编辑:程序博客网 时间:2024/06/18 06:08
Description
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.
Input
The first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.
Output
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.
Example
Input
8
Output
YES
Solution
给一个数n,判断它能否二分成两个偶数。
Code
#include <stdio.h>int main(int argc, char const *argv[]){ int n; scanf("%d",&n); if (n/2>1&&n%2==0) printf("YES\n"); else printf("NO\n"); return 0;}
- codeforces 4A Watermelon
- Codeforces 4A
- Codeforces 4A. Watermelon
- Codeforces 4A
- CodeForces 4A-Watermelon
- CodeForces-4A-Letter
- day1 CodeForces 4A
- codeforces-4A-Watermelon
- codeforces 4A water
- CodeForces 4A
- Codeforces 4A Watermelon
- Codeforces 4A
- codeforces 4A watermelon
- Codeforces Round #4A. Watermelon
- Codeforces 4A-Watermelon(题意)
- Problem--4A--Codeforces--Watermelon
- CodeForces-a
- Codeforces 903A A
- spring学习笔记6--AOP
- JAVA NIO(一):Buffer.mark()的用法
- next_permutation与使用
- Java之JFileChooser设置窗体打开路径
- php 注册email激活账号技术
- Codeforces 4A
- 【Android 从入门到放弃】 ButterKnife 使用
- C++实现顺序表
- 正则表达式
- 产品分析和深度学习资料(持续补充)
- JAVA NIO(二):小端字节顺序
- Java.util.Arrays.deepToString(Object[])
- CentOS配置服务器常用指令
- oracle---合并geometry