No.3481 495
タグ : / 解いたユーザー数 124
作問者 : 👑
hamamu
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もしくは右上の雲マークをクリックしてアカウントを作成してください。