AtCoder Beginner Contest 101
B
Digit Sums
AtCoder
⌀ 0
原题
← AC →
翻译中…

Problem Statement

翻译中…

Let $S(n)$ denote the sum of the digits in the decimal notation of $n$. For example, $S(101) = 1 + 0 + 1 = 2$.

翻译中…

Given an integer $N$, determine if $S(N)$ divides $N$.

翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 10^9$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

If $S(N)$ divides $N$, print Yes; if it does not, print No.

翻译中…

样例

Input #1
12
Output #1
Yes
In this input, $N=12$. As $S(12) = 1 + 2 = 3$, $S(N)$ divides $N$.
Input #2
101
Output #2
No
As $S(101) = 1 + 0 + 1 = 2$, $S(N)$ does not divide $N$.
Input #3
999999999
Output #3
Yes
题目信息
题号
abc101_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。