| CodeRams Practice Problem Archive |
|---|
| Finished |
You consider a number to be cheesy if it is divisible by the sum of its digits. For example, the sum of the digits of 360 is 9, and 360 is divisible by 9, so 360 is a cheesy number. On the other hand, the sum of digits of 87 is 15, and 87 is not divisible by 15, so 87 is not a cheesy number.
Given a number $$$n$$$, figure out whether or not it is a cheesy number.
The only line of input contains a single integer $$$n$$$: the number to test. $$$n$$$ is guaranteed to fit inside of an "int" data type in Java.
If $$$n$$$ is a cheesy number as described above, output "YES" (no quotes). Otherwise, output "NO" (no quotes).
360
YES
87
NO
72
YES
| Name |
|---|


