Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
352 B
0
Indexable
Never
# Defining a function for harshed numbers
def FindHarsh(x):
    # Nested loop
    for j in range(int(x), 100000000000):
        sum = 0
        digit = str(j)
        for i in range(len(digit)):
            sum += int(digit[i])
        if j % sum == 0:
            return j
            break
# Input
n = str(input())
number = FindHarsh(n)
print(number)