407166: GYM102697 137 Cheesy Numbers
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
137. Cheesy Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
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.
InputThe 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.
OutputIf $$$n$$$ is a cheesy number as described above, output "YES" (no quotes). Otherwise, output "NO" (no quotes).
ExamplesInput360Output
YESInput
87Output
NOInput
72Output
YES