Problem:


Score : 200 points

Problem Statement

An integer X is called a Harshad number if X is divisible by f(X), where f(X) is the sum of the digits in X when written in base 10.

Given an integer N, determine whether it is a Harshad number.

Constraints

1?N?10^8

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print Yes if N is a Harshad number; print No otherwise.

Sample Input 1

12

Sample Output 1

Yes

f(12)=1+2=3. Since 12 is divisible by 3, 12 is a Harshad number.

Sample Input 2

57

Sample Output 2

No

f(57)=5+7=12. Since 57 is not divisible by 12, 12 is not a Harshad number.

Sample Input 3

148

Sample Output 3

No



Sample input:
12


Sample output:
Yes

Submission status: Accepted

Solution code:
n = input()

print('Yes') if int(n) % sum(map(int, n)) == 0 else print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=str(n)
a=0
for i in s:
    a+=int(i)
print('Yes' if n%a==0 else 'No')

Submission status: Accepted

Solution code:
N=list(input())

a=0
for i in N:
    a+=int(i)
K=''
for i in N:
     K+=i
K=int(K)
if K%a==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def f(n):
  return sum(map(int, str(n)))

X = int(input())

if X % f(X) == 0: 
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
x = int(input())
y = [i for i in str(x)]
res = 0
for j in y:
  res += int(j) 
print("Yes" if x%res==0 else "No")

Submission status: Accepted

Solution code:
n = int(input())
print("Yes" if n%eval("+".join(str(n))) == 0 else "No")

Submission status: Accepted

Solution code:
def kakuwa(n):
    return sum(map(int, list(str(n))))
N=int(input())
print('YNeos'[N%kakuwa(N)>0::2])

Submission status: Accepted

Solution code:
n=input()
c=0
for i in n:
    c+=int(i)
print("No" if int(n)%c else "Yes")

Submission status: Accepted

Solution code:
N = input()
fx = 0
for i in range(len(N)):
  fx = fx + int(N[i])
if int(N) % fx == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())
dig_sum=0
tmp=n

while(tmp>0):
    dig_sum+=tmp%10
    tmp=int(tmp/10)

if n%dig_sum==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#各桁の和を計算する関数
def findSumOfDigits(n):
  sum = 0
  while( n > 0):
    sum += int(n) % 10
    n = int(n) / 10
  return int(sum)

N = int(input())
total = findSumOfDigits(N)
if N % total == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n =  input()
print('No' if int(n) % sum(map(int, n)) else 'Yes')

Submission status: Accepted

Solution code:
n=input()
N=int(n)
a=0
for i in range(0,len(n)):
  a+=int(n[i])
if N%a==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = input()
print('Yes') if int(N) % sum(map(int, list(N))) == 0 else print('No')

Submission status: Accepted

Solution code:
n=list(input())
fx=0
for i in range(len(n)):
    fx+=eval(n[i])
n2="".join(n)
print("Yes" if int(n2)%fx==0 else "No")

Submission status: Accepted

Solution code:
N = int(input())
NN = N
X = 0
while N > 0:
    X += (N % 10)
    N //= 10
if NN % X == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
sn = list(n)
fx = 0
for i in range(len(sn)):
        fx += int(sn[i])
n = int(n)
if n%fx == 0:
        print("Yes")
else:
        print("No")

Submission status: Accepted

Solution code:
N = int(input())
n = sum(list(map(int, str(N))))

if N % n == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
a=sum(int(i) for i in list(str(n)))
print('YNeos'[n%a!=0::2])

Submission status: Accepted

Solution code:
n=input()
m=0
for i in n:
  m+=int(i)
print('Yes' if int(n)%m==0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())
s = sum(list(map(int, str(n))))

if n%s == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
x = int(input())
i = x
f = []
while i > 0:
  f.append(i%10)
  i //= 10
if x%sum(f)==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N=int(input())
N_sum=list(str(N))
fN=0
for n in range(len(N_sum)):
  fN+=int(N_sum[n])
if N%fN==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# ABC080 B - Harshad Number
N = int(input())
S = str(N)

fx = 0
for s in S:
    fx += int(s)

if N%fx == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()

f = 0
for _ in list(n):
    f += int(_)

if int(n) % f == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
import math
n_keta = 1+math.floor(math.log10(n))
wa = 0
for i in range( n_keta):
  wa += math.floor(n/(10**i))%10
print('Yes' if n//wa == n/wa else 'No')

Submission status: Accepted

Solution code:
N = int(input())

if N % sum(map(int,str(N))) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = list(input())
x = 0
for i in range(len(S)):
  x+= int(S[i])
X = int("".join(S))
print("Yes" if X%x==0 else "No")

Submission status: Accepted

Solution code:
N = int(input())
f = sum(list(map(int,list(str(N)))))
if N%f==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()
length = len(N)
n = int(N)
n1 = int(N)
S = 0
while(length!=0):
    number = n//(10**(length-1))
    S = S + number
    n = n - number*(10**(length-1))
    length = length - 1
if n1%S==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x = input()
sx = int(x)
sum_ = sum([int(num) for num in list(x)])
if sx%sum_ == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()
a = 0
for i in n:
	a += int(i)
if int(n) % a == 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
N = int(input())
n = list(str(N))

ans = 0
for i in n:
    ans += int(i)

if N % ans == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
print('Yes') if int(n) % sum(map(int, n)) == 0 else print('No')

Submission status: Accepted

Solution code:
N=str(input())
n="".join(N)
num=0
for k in range(0,len(n)):
  num+=int(n[k])
if int(N)%num==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    fn = reduce(lambda acc, x: acc + int(x), str(N), 0)
    if N % fn == 0:
        return 'Yes'
    return 'No'


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

Solution code:
N = input()

num = int(N)

sum = 0
while num > 0:
    sum += num % 10
    num //= 10

print('Yes' if int(N) % sum == 0 else 'No')

Submission status: Accepted

Solution code:
def findSumOfDigits(n):
    sum = 0
    while(n > 0):
        sum += n % 10
        n //= 10
    return sum 

N = int(input())
sum = findSumOfDigits(N)
if N % sum == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
m=N
n=0
while m//10>0:
    n+=m%10
    m//=10
    #print(m)
n+=m
#print(n)
print('Yes') if N%n==0 else print('No')

Submission status: Accepted

Solution code:
N = int(input())
X = N
digitsum = 0
while X > 0:
    digitsum += (X % 10)
    X = X // 10
if N % digitsum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=input()
h=0
for i in range(len(n)):
    h+=int(n[i])
if int(n)%h==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n = str(input().rstrip('\n'))
    t = 0
    for i in range(len(n)):
        t += int(n[i])
    print("Yes" if int(n) % t == 0 else "No")


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
N = int(input())
f = 0
q, mod = divmod(N, 10)
f += mod
while q != 0:
    q, mod = divmod(q, 10)
    f += mod
if N % f == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
fx = 0
for n in N:
  fx += int(n)
if int(N) % fx == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = input()
num = list(n)
sum = 0

for i in num:
    sum += int(i)

if int(n) % sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()
if int(n) % sum(map(int,n)) == 0:
  print('Yes')
else: print('No')

Submission status: Accepted

Solution code:
n=input()
print('No' if int(n)%sum(map(int,n)) else 'Yes')

Submission status: Accepted

Solution code:
def bb080():
    n = int(input())
    m = sum(list(map(int, list(str(n)))))
    print('Yes' if n%m == 0 else 'No')

bb080()

Submission status: Accepted

Solution code:
N=int(input())
def check(x):
    xp=x
    _sum=0
    while x>0:
        _sum+=x%10
        x=x//10
    return True if xp % _sum == 0 else False
if check(N):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
X = 0
for i in range(len(N)):
  X += int(N[i])
if int(N) % X == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
Nlist = list(map(int, str(N)))
if(N%sum(Nlist)==0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

if n % sum(map(int, list(str(n)))) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a = int(input())
b = a
sum = 0
while a > 0:
    sum += a % 10
    a = a // 10
if b % sum== 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
if N % sum([int(i) for i in list(str(N))]) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
wa = 0
for i in range(len(str(n))):
    wa += int(str(n)[i])
if n%wa==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a = int(input())
b = a
f = 0
while a > 0:
    f += a % 10
    a = a // 10
if b % f == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
a = [str(i) for i in str(n)]
b = [int(j) for j in a]
print('Yes' if n%sum(b)==0 else 'No')

Submission status: Accepted

Solution code:
#2019/09/26
N = input()
print("Yes" if int(N) % sum(map(int, N)) == 0 else "No")

Submission status: Accepted

Solution code:
n = input()
print('No' if int(n) % sum(map(int, n)) else 'Yes')

Submission status: Accepted

Solution code:
def find_sum_of_digits(n):
    total = 0
    while n > 0:
        total += n % 10
        n //= 10
    return total


N = int(input())
total = find_sum_of_digits(N)
if N % total == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=input()
x=0
for i in range(len(n)):
    x+=int(n[i])
print('YNeos'[int(n)%x>0::2])

Submission status: Accepted

Solution code:
N = int(input())

n=N
total=0

while n>0:
    total += n%10
    n = n//10

if N%total==0:print('Yes')
else:print('No')

Submission status: Accepted

Solution code:
n=int(input())
a=0
a+=n%10
b=n//10 
while b>0:
    a+=b%10
    b=b//10
print('Yes' if n%a==0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())
x = eval("+".join(str(n)))
print("Yes" if n % x == 0 else "No")

Submission status: Accepted

Solution code:
S = input()
q = 0
for i in list(S):
  q += int(i)
if int(S)% q == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import math
import sys
input = sys.stdin.readline


def main():
    N = int(input())
    S = sum(list(map(int, list(str(N)))))
    if N%S==0:
        print('Yes')
    else:
        print('No')
    


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())
if x%sum(int(i) for i in list(str(x))) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
m = n
k = 0
while(m > 0):
  l = m % 10
  k += l
  m = m // 10
if(n % k == 0):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = input()

s = 0
for i in range(len(n)):
    s += int(n[i])

if int(n) % s == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
t = n
fn = 0
for i in range(20):
    if n == 0:
        break
    fn += n%10
    n //= 10
print('No' if t%fn else 'Yes' )

Submission status: Accepted

Solution code:
n = str(input())
wa = ""
for i in n:
  wa += "+"+i

if int(n)%(eval(wa)) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
x = input()
print('Yes' if int(x)%sum(map(int,x)) == 0 else 'No')

Submission status: Accepted

Solution code:
N = int(input())
def summ(X):
  a = X//10000000
  b = (X - a*10000000)//1000000
  c = (X - a*10000000 - b*1000000)//100000
  d = (X - a*10000000 - b*1000000 - c*100000)//10000
  e = (X - a*10000000 - b*1000000 - c*100000 - d*10000)//1000
  f = (X - a*10000000 - b*1000000 - c*100000 - d*10000 - e*1000)//100
  g = (X - a*10000000 - b*1000000 - c*100000 - d*10000 - e*1000 - f*100)//10
  h = X - a*10000000 - b*1000000 - c*100000 - d*10000 - e*1000 - f*100 - g*10
  return a+b+c+d+e+f+g+h
if N % summ(N) == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = input()
s = sum(int(i) for i in list(N))
print("Yes" if int(N)%s==0 else "No")

Submission status: Accepted

Solution code:
N = int(input())
cnt = 0
n = N
while N > 0:
    cnt += N % 10
    N = N//10

print('Yes' if n % cnt == 0 else 'No')

Submission status: Accepted

Solution code:
n = input()
m = [int(c) for c in n]
print("No") if int(n)%sum(m) else print("Yes")

Submission status: Accepted

Solution code:
# 各桁の総和を求める関数
def calcDigitSum(n):
    digitSum = 0
    digitSum += n % 10
    wari = n // 10

    while wari > 0:
        digitSum += wari % 10
        wari = wari // 10
    
    return digitSum

n = int(input())

if n % calcDigitSum(n) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

sum = 0
sum += n % 10
wari = n // 10

while wari > 0:
    sum += wari % 10
    wari = wari // 10

if n % sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()
nlen = len(n)
nsum = 0

for i in range(nlen):
  nsum = nsum + int(n[i])

if int(n)%nsum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()
sum_n = 0
for i in n:
    sum_n += int(i)
if int(n) % sum_n:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
n=int(input())
s=list(str(n))
for i in range(len(s)):
    s[i]=int(s[i])
N=sum(s)
if(n%N==0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

n = 0
t = N
while t != 0:
  n += t % 10
  t //= 10

if N % n == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = input()
a = [int(i) for i in str(n)]

if int(n) %sum(a) ==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = input()

N_list = []
for n in N:
    N_list.append(int(n))

sum_place = sum(N_list)
if int(N) % sum_place == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())
F=sum(map(int,list(str(N))))

ans="Yes"
if N%F:
  ans="No"
print(ans)

Submission status: Accepted

Solution code:
n=input()
sum=sum(map(int,list(n)))
print('Yes' if int(n)%sum==0 else 'No')

Submission status: Accepted

Solution code:
def f(i):
  s = str(i)
  array = list(map(int, s))
  return sum(array)

n = int(input())

print('Yes' if n % f(n) == 0 else 'No')

Submission status: Accepted

Solution code:
n = input()
print("Yes" if int(n) % sum(map(int,n)) == 0 else "No")

Submission status: Accepted

Solution code:
n = int(input())
fx = 0
temp = n
for i in range(8):
  fx += temp % 10
  temp //= 10

if n % fx == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
x = input()
fx = sum(map(int, x))
print("Yes" if int(x) % fx == 0 else "No")

Submission status: Accepted

Solution code:
def sum_of_dig(n):
    s = str(n)
    l = len(s)
    return sum(int(s[i]) for i in range(l))

N = int(input())
if N % sum_of_dig(N) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
f = sum(map(int, list(N)))
print('Yes' if int(N)%f == 0 else 'No')

Submission status: Accepted

Solution code:
N = int(input())
digit_sum = sum(map(int, list(str(N))))
if N % digit_sum == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
x = sum(map(int, list(str(n))))
if n % x == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

r = N
q = 0
while r != 0:
    q += r % 10
    r //= 10

if N % q == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()
fx = sum(map(int,n))
print('Yes' if int(n)%fx==0 else 'No')

Submission status: Accepted

Solution code:
n = input()
fx = sum(map(int,list(n)))
print('Yes' if int(n)%fx==0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())

if n % (sum(list(map(int, list(str(n)))))) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
N_temp = N
f = 0
while N_temp != 0:
    f = int(f + N_temp%10)
    N_temp = int(N_temp/10)

if (int(N%f) == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()

fx = sum(map(int, n))

if int(n) % fx == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
t = list(s)
print ("Yes") if (int(s) % sum(map(int,t)) == 0) else print ("No")

Submission status: Accepted

Solution code:
N=input()
print(['No','Yes'][int(N)%sum(map(int,list(N)))==0])

Submission status: Accepted

Solution code:
N = input()
fx = 0
for n in list(N):
    fx += int(n)
if int(N) % fx == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
f = 0
for i in N:
    f += int(i)
N = int(N)

if N%f == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
print("No" if n%sum([int(i) for i in str(n)]) else "Yes")

Submission status: Accepted

Solution code:
N = input().strip()
print('Yes' if int(N) % sum(map(int, N)) == 0 else 'No')

Submission status: Accepted

Solution code:
N = input()
fx = 0
for i in range(len(N)):
    fx += int(N[i])
if int(N)%fx == 0:
    print("Yes")
else: print("No")

Submission status: Accepted

Solution code:
N = str(input())
N_int = int(N)

Nl = list(N)

Ni = []
for i in Nl:
  i = int(i)
  Ni.append(i)


A = sum(Ni)

if N_int%A == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=input()
print('Yes' if int(n)%sum(map(int,n))==0 else 'No')

Submission status: Accepted

Solution code:
a=int(input())
x = 0
for i in list(str(a)):
  x += int(i)
if a%x == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = str(input())
    S = 0
    for s in N:
        S += int(s)
    if int(N)%S == 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N = int(input())
print('Yes'*(N%(sum(list(map(int,str(N))))) == 0)or'No')

Submission status: Accepted

Solution code:
N = input()

x = int(N)
fx = sum(map(int, list(N)))

if x % fx == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = list(input())
f_N = 0
for i in N:
  f_N += int(i)
print('Yes') if int(''.join(N))%f_N == 0 else print('No')

Submission status: Accepted

Solution code:
N = input()
N_int = int(N)
f = sum(map(int, N))


print("Yes" if N_int % f==0 else "No")

Submission status: Accepted

Solution code:
n = input()
total = 0
for i in range(len(n)):
    total += int(n[i])
if int(n) % total == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a = input()
number = [int(s) for s in a]
total = sum(number)
if int(a) % total ==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = input()
count = sum(int(x) for x in N)
print('Yes' if int(N) % count == 0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())
print('Yes'if n % sum(map(int,str(n))) == 0 else 'No')

Submission status: Accepted

Solution code:
n=str(input())
f=0
for i in range(len(n)):
    f += int(n[i])
print('Yes' if int(n)%f == 0 else 'No')

Submission status: Accepted

Solution code:
a = input()
number = [int(s) for s in a]
total = sum(number)
if int(a) % total == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N=input();print("YNeos"[int(N)%sum(map(int,N))>0::2])

Submission status: Accepted

Solution code:
n = input()
if int(n) % sum(map(int,n)) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import copy

N = int(input())
X = copy.deepcopy(N)
fx = 0
while X > 0:
    fx += X % 10
    X = X // 10
if N % fx == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
print("Yes" if int(n)%sum(map(int,n)) == 0 else "No")

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

N =  int(sys.stdin.readline())
X = sum(map(int,list(str(N))))
if N % X == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()

s = [int(n) for n in N]
t = sum(s)

if int(N) % t == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=input()
f=0
for i in N:
	f+=int(i)
N=int(N)
print('Yes' if N%f==0 else 'No')

Submission status: Accepted

Solution code:
n = input()
nList = list(n)
nSum = 0
for i in range(len(n)):
    nSum += int(nList[i])

print("Yes" if int(n) % nSum == 0 else "No")

Submission status: Accepted

Solution code:
n = int(input())
print('Yes' if n % sum(map(int, list(str(n)))) == 0 else 'No')

Submission status: Accepted

Solution code:
n=input()
sum=0
for i in range(len(n)):
  sum+=int(n[i])
if int(n)%sum==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = int(input())

sum = 0
N_str = str(N)
for i in range(len(N_str)):
  sum += int(N_str[i])
  
if N%sum == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = input()
print("No" if int(n)%sum(map(int,n)) else "Yes")

Submission status: Accepted

Solution code:
n = int(input())

num = n
x = 0

while num > 0:
  x += num % 10
  num = int(num/10)

if n % x == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N=int(input())
S=N
n=str(N)
sum=0
  
for i in range(len(n)) :
  sum+=(N%10)
  N =N//10

if S%sum == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = input()
a = 0
for i in range(len(n)):
    a += int(n[i])

if int(n) % a == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

if N % sum(map(int, str(N))) == 0 :
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
N = input()

res = 0
for x in N:
    res += int(x)
if int(N)%res == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=input()
fn=0
for i in range(len(n)):
    fn+=int(n[i])
if int(n)%fn==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
    N = input().strip()
    tmp = 0
    for i in range(len(N)):
        tmp += int(N[i])
    # print(tmp)
    if int(N) % tmp == 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = input()
x = 0
for i in range(len(a)):
    x += int(a[i])
print("Yes" if int(a) % x == 0 else "No")

Submission status: Accepted

Solution code:
n=int(input())
ori=n
sum=0
while n>0:
    mod=n%10
    n=n//10
    sum+=mod
if ori%sum==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
n = sum(map(int, str(N)))
if N%n==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
N = input()
X = 0
for i in range(len(N)):
    X += int(N[i])
print("Yes" if int(N) % X == 0 else "No")

Submission status: Accepted

Solution code:
# ABC080a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n = input()[:-1]
num = int(n)
if (num % sum(list(map(int, list(n)))) == 0):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()

S = 0
for i in range(len(N)):
	S += int(N[i])

if int(N) % S == 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
s = input()
print("Yes" if int(s)%sum(map(int,s)) == 0 else "No")

Submission status: Accepted

Solution code:
n = input()

sm = 0
for num in n:
    sm += int(num)

print("Yes" if int(n) % sm == 0 else "No")

Submission status: Accepted

Solution code:
X=input()
print("Yes" if int(X)%sum(map(int,X))==0 else "No")

Submission status: Accepted

Solution code:
n=list(input())

num=0
harshad=0
for i in n:
  num=10*num+int(i)
  harshad=harshad+int(i)

if num%harshad==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = input()
print("Yes" if int(n)%sum(map(int,n))==0 else "No")

Submission status: Accepted

Solution code:
a = (input())
number_2 = [int(s) for s in a]
total = sum(number_2)
if int(a) % total == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = input()
N_temp = int(N)
N = list(N)
*N,  = map(int, N)

sm = sum(N)

print("Yes" if N_temp % sm == 0 else "No")

Submission status: Accepted

Solution code:
n=input()
N=list(map(int,n))
x=int(n)
if x%sum(N)==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=input();print("YNeos"[int(n)%sum([int(i)for i in n])!=0::2])

Submission status: Accepted

Solution code:
n = input()
fn = sum(map(int,n))
print("Yes" if int(n)%fn==0 else "No")

Submission status: Accepted

Solution code:
def resolve():
    n = input()
    fx = sum([int(c) for c in n])
    print("Yes" if int(n) % fx == 0 else "No")


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
def test():
    n = input()
    s = int(n)
    t = sum(list(map(int,list(n))))
    print("Yes" if s%t == 0 else "No")


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
n = input()
nn = list(n)
nn = [int(i) for i in nn]
if int(n) % sum(nn):
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
import sys
import  math
from statistics import *
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
s = str(n)
f = sum([int(s[i]) for i in range(len(s))])
print('Yes' if n % f == 0 else 'No')

Submission status: Accepted

Solution code:
n=input();print("YNeos"[int(n)%sum(map(int,list(n)))>0::2])

Submission status: Accepted

Solution code:
N = input()
print('Yes' if int(N) % sum(map(int, N)) == 0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())
x = str(n)
fx = 0
for i in range(len(x)):
    fx += int(x[i])
if n % int(fx) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
x = sum(map(int, n))
print('Yes' if int(n) % x == 0 else 'No')

Submission status: Accepted

Solution code:
n=input()
print('Yes'if int(n)%sum([int(i) for i in n])==0 else'No')

Submission status: Accepted

Solution code:
N = input()
f = sum(map(int,list(N)))
if int(N)%f == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=0
ans=0
a=n
while a>0:
    s += a%10
    a = a//10

if n%s==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
m = list(str(n))

if n%sum(map(int,m)) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())
def digitsum(k):
    s=str(k)
    array=list(map(int,s))
    return sum(array)
if n%digitsum(n)==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()

F = sum(map(int, list(N)))
N = int(N)

if N % F == 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
def digit_sum(x):
    total = 0
    while x > 0:
        total += x % 10
        x //= 10
    return total


def is_harshad(x):
    return (x % digit_sum(x) == 0)

n = int(input())
if is_harshad(n):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:


def main():

    N = [i for i in input()]
    digitSum = sum(map(int,N))
    print('Yes') if int(''.join(N))%digitSum==0 else print('No')




if __name__== "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()
N = int(S)
m = 0
for s in S:
  m += int(s)
if N%m == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=input()
N=sum(list(map(int,n)))
print('Yes') if int(n)%N==0 else print('No')

Submission status: Accepted

Solution code:
n = int(input())
nn = n
sum=0
while n>0:
  sum+=n%10
  n= (n-n%10)/10
  
if nn%sum==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S = input()

N = int(S)
H = list(S)

harshad = 0

for i in H:
    harshad += int(i)

if N % harshad == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

result = sum(list(map(int,str(n))))

print("Yes") if n%result == 0 else print("No")

Submission status: Accepted

Solution code:
def wa(x):
    ans = 0
    while x >= 1:
        ans += int(x%10)
        x = x // 10
    return ans

n = int(input())
if n % wa(n) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

from functools import reduce
from operator import add

n = input()

ints = list(map(int, list(n)))
#print(ints)
reduced = reduce(add, ints)
#print(reduced)
print("Yes" if int(n) % reduced == 0 else "No")

Submission status: Accepted

Solution code:
N = int(input())
M = N
s = 0
while N != 0:
    s = s + N % 10
    N = N // 10
if M % s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
s = 0
for i in range(len(N)):
    s = s + int(N[i])
if int(N) % s == 0:
    print('Yes')
else:
    print('No')