You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
212 B

package correct
func isInteresting(n int) bool {
s := 0
for n > 0 {
s += n % 10
n /= 10
}
return s%7 == 0
}
func InterestingNumber(n int) int {
for {
if isInteresting(n) {
return n
}
n++
}
}