美文网首页
T1-1第一题吃瓜问题CodeForces - 4A amc第一

T1-1第一题吃瓜问题CodeForces - 4A amc第一

作者: xcpooo | 来源:发表于2018-12-09 22:50 被阅读0次

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.

#include<iostream>
using namespace std;
int main() {
    int a;
    cin >> a;
    if (a == 2)cout << "NO";//如果质量是整数2,分成两部分是1+1,都是单数
    else if (a % 2 == 0) cout << "YES";
    else cout << "NO";
    return 0;
}

相关文章

  • T1-1第一题吃瓜问题CodeForces - 4A amc第一

    InputThe first (and the only) input line contains integer...

  • codeforces 4A (math,brute force)

    http://codeforces.com/problemset/problem/4/A 生词:even numb...

  • 春吃芽,夏吃瓜!夏季营养第一瓜,你吃对了吗?

    春吃芽,夏吃瓜!夏季营养第一瓜,你吃对了吗? 民间有句谚语“春吃芽、夏吃瓜、秋吃果、冬吃根”。夏季是吃瓜的季节,市...

  • 福祸相依

    签字好顺利 可能前期不太顺利 [吃瓜][吃瓜][吃瓜] 打印又遇到点问题 可以开心的看书了 晚会等保藏学老师给室友...

  • 第一辑  饮食与健康

    它是夏季第一瓜!高钾低钠,浑身是宝~ 中医讲究顺时养生,“春吃芽、夏吃瓜、秋吃果、冬吃根”,夏季正是吃瓜的...

  • 气数将尽!王健林盛赞的AMC打脸!健林的19个小目标一下没了

    “AMC院线自身从美国第二变成第一,而且在欧洲也成为第一,世界也是第一。” “AMC……去年利润大幅增长……创造了...

  • 吃瓜吃瓜

    这几天点开哪个网站都是吴秀波出轨的消息,内容不必赘述。只是今晚看又看到有人说:吴秀波不是人设崩塌是得罪人了。只看了...

  • 吃瓜吃瓜

    秋天,阳光明媚,秋风宜人,只是太干燥,以至于我都流鼻血了,哎! 有点怀念夏天,怀念夏天的西瓜了! 来一块吧! 本来...

  • 吃瓜吃瓜

    不喜欢追星的我,也知道吴亦凡是位大明星,知名度高,流量大,粉丝多,太火了,但爆出来的雷太大,毁三观······ 让...

  • 吃瓜群众的吃瓜方法是什么方法呢?

    前 全家在吃甜瓜的时候,讨论了一下吃瓜群众的问题,想看看哪种吃瓜的方法更好,爸爸说吃瓜群众的方法,是大口大口的...

网友评论

      本文标题:T1-1第一题吃瓜问题CodeForces - 4A amc第一

      本文链接:https://www.haomeiwen.com/subject/ddllhqtx.html