Tổng Số

View as PDF

Submit solution

Points: 0.30
Time limit: 2.0s
Memory limit: 1G

Author:
Problem type
Problem Statement

Gọi ~ S (n) ~ biểu thị tổng các chữ số trong ký hiệu thập phân của ~ n ~. Ví dụ, ~ S (101) = 1 + 0 + 1 = 2 ~.

Cho một số nguyên ~ N ~, xác định xem ~ S (N) ~ chia hết ~ N ~.

Constraints
  • ~ 1\leq N\leq 10 ^ 9 ~

Input

Nhập Input theo format dưới đây:

~N~

Output

Nếu ~ S (N) ~ chia hết ~ N ~, in ra Yes; nếu không, hãy in No.


Sample Input 1
12
Sample Output 1
Yes

trong Input này, ~ N = 12 ~. ~ S (12) = 1 + 2 = 3 ~, ~ S (N) ~ chia hết ~ N ~.


Sample Input 2
101
Sample Output 2
No

~ S (101) = 1 + 0 + 1 = 2 ~, ~ S (N) ~ không chia hết ~ N ~.


Sample Input 3
999999999
Sample Output 3
Yes

Comments

Please read the guidelines before commenting.


There are no comments at the moment.