問題一覧 > 通常問題

No.3481 495

レベル : / AI推定難易度 : 75 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 124
作問者 : 👑 AngrySadEight / テスター : 👑 binap 👑 hamamu
お気に入りにしたユーザー ProblemId : 12912 / 自分の提出
問題文最終更新日: 2026-10-16 16:23:29
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 495 (順位表) の他の問題:

Problem Statement

You are given a $3$-digit positive integer $N$. Let $a, b, c$ be the digits in the hundreds, tens, and ones places of $N$, respectively. Determine whether $a + c = b$.

Constraints

  • $N$ is an integer
  • $100 \leq N \leq 999$

Input

The input is given from standard input in the following format.

$N$

Output

Let $a, b, c$ be the hundreds, tens, and ones digits of $N$, respectively. Print Yes if $a + c = b$, and No otherwise.

Sample

Sample 1
Input
495
Output
Yes

We have $a = 4, b = 9, c = 5$. Since $4 + 5 = 9$, $a + c = b$ holds, so print Yes.

Sample 2
Input
999
Output
No

We have $a = 9, b = 9, c = 9$. Since $9 + 9 = 18$, $a + c = b$ does not hold, so print No.

Sample 3
Input
121
Output
Yes

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。