CodeForces 4 A.Watermelon(水~)
来源:互联网 发布:百度云 知乎 编辑:程序博客网 时间:2024/06/02 04:02
Description
一个体积为w的西瓜,能否分成两半使得体积均为偶数
Input
一个整数w表示西瓜体积(1<=w<=100)
Output
如果可以分成体积均为偶数的两块则输出YES,否则输出NO
Sample Input
8
Sample Output
YES
Solution
水题,奇数和2不行,其他都行
Code
#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include<queue>#include<map>#include<set>#include<ctime>using namespace std;typedef long long ll;#define INF 0x3f3f3f3f#define maxn 1111int main(){ int w; while(~scanf("%d",&w)) { if(w%2==1||w==2)printf("NO\n"); else printf("YES\n"); } return 0;}
阅读全文
0 0
- CodeForces 4 A.Watermelon(水~)
- CodeForces 4 A.Watermelon(水)
- codeforces 4A Watermelon
- Codeforces 4A. Watermelon
- CodeForces 4A-Watermelon
- codeforces-4A-Watermelon
- Codeforces 4A Watermelon
- codeforces 4A watermelon
- CodeForces 4A Watermelon(太水了。。。。。)
- codeforces 4A Watermelon(数学水题)
- CodeForces 4A Watermelon(水题)
- Codeforces Round #4A. Watermelon
- Codeforces 4A-Watermelon(题意)
- Problem--4A--Codeforces--Watermelon
- codeforces Round4 A. Watermelon
- 【CodeForces】A. Watermelon
- CF 4A Watermelon(水??!!)
- Codeforces Beta Round #4 (Div. 2) / 4A Watermelon(数学)
- Java反射
- Linux配置定时,使用 crontab -e 与 直接编辑 /etc/crontab 的区别
- 进程、线程间通信方式
- openlayers3 聚合分析专题图 cluster
- Android中点击图片放大的简单方法
- CodeForces 4 A.Watermelon(水~)
- Go语言学习笔记 --- 入门介绍
- Spring boot 整合mybtais和druid
- JDBC技术
- spring boot 使用hibernate-validation
- osgViewer应用基础
- NVcaffe源码阅读——Blob的重新构建
- 排序算法
- NOIP2016Day1T1玩具谜题解题报告