AT_abc461_a.Armor

入门

通过率:0%

时间限制:2.00s

内存限制:1024MB

AC君温馨提醒

该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Takahashi is wearing armor.

This armor blocks all attacks with power (strength represented as an integer) of DD or less, but does not block attacks with power greater than DD.

Does this armor block an attack with power AA?

高桥正在穿着盔甲。

该盔甲可以阻挡所有攻击力(以整数表示的强度)不超过 DD 的攻击,但无法阻挡攻击力大于 DD 的攻击。

该盔甲能否阻挡攻击力为 AA 的攻击?

输入格式

The input is given from Standard Input in the following format:

AA DD

输入从标准输入中按以下格式给出:

AA DD

输出格式

Output Yes if the armor blocks the attack, and No otherwise.

如果护甲能阻挡攻击,则输出 Yes,否则输出 No。

输入输出样例

  • 输入#1

    4 5

    输出#1

    Yes
  • 输入#2

    5 5

    输出#2

    Yes
  • 输入#3

    6 5

    输出#3

    No

说明/提示

Sample 1 Explanation:
In this sample, A=4A = 4 and D=5D = 5. Since A=4A = 4 is at most D=5D = 5, the armor blocks the attack, so the answer is Yes.

Sample 2 Explanation:
In this sample, A=5A = 5 and D=5D = 5. Since A=5A = 5 is at most D=5D = 5, the armor blocks the attack, so the answer is Yes.

Sample 3 Explanation:
In this sample, A=6A = 6 and D=5D = 5. Since A=6A = 6 is not at most D=5D = 5, the armor does not block the attack, so the answer is No.

Constraints

  • 1≤A≤1001 \leq A \leq 100
  • 1≤D≤1001 \leq D \leq 100
  • All input values are integers.

样例 1 解释:
本样例中,A=4A = 4 且 D=5D = 5。由于 A=4A = 4 不超过 D=5D = 5,护甲可阻挡此次攻击,因此答案为 Yes。

样例 2 解释:
本样例中,A=5A = 5 且 D=5D = 5。由于 A=5A = 5 不超过 D=5D = 5,护甲可阻挡此次攻击,因此答案为 Yes。

样例 3 解释:
本样例中,A=6A = 6 且 D=5D = 5。由于 A=6A = 6 超过了 D=5D = 5,护甲无法阻挡此次攻击,因此答案为 No。

限制条件

  • 1≤A≤1001 \leq A \leq 100
  • 1≤D≤1001 \leq D \leq 100
  • 所有输入值均为整数。

输入解题思路,AI测评打分。不知道怎么写?

首页