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 = int(input())

ans = N
digit = 0
while ans>0:
    tmp = ans%10
    digit += tmp
    ans = ans//10

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

Submission status: Accepted

Solution code:
s = input()
n = int(s)
x = 0
for c in s:
  x += int(c)

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

Submission status: Accepted

Solution code:
import math
def main():
  n = int(input())
  x=n
  fx=0
  while x>0:
    fx+=x%10
    x=int(x/10)
  if n%fx==0:
    print('Yes')
  else:
    print('No')
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
list_n = list(n)

fx = 0
for i in list_n:
  fx += int(i)

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
array_N = list(map(int,str(N)))

if not (1 <= N <= 10 ** 8):
    sys.exit()

sum_array_N = 0
for I in range(len(array_N)):
    sum_array_N += array_N[I]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(x):
  s = 0
  while x > 0:
    s += x % 10
    x = int(x / 10)
  return s

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = list(s())
ans = 0
for i in range(len(N)):
    ans += int(N[i])
if int(''.join(N))%ans == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N=input()
ans=0
for i in N:
  ans+=int(i)
if int(N)%ans==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()
sum_Ndig =sum(map(int,N))
print( 'Yes' if int(N) % sum_Ndig ==0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())
nn = list(str(n))
num = [int(i) for i in nn]
total = 0
for i in range(len(nn)):
    total += num[i]

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

Submission status: Accepted

Solution code:
n = int(input())
nn = list(str(n))
num = [int(i) for i in nn]
total = 0
for i in range(len(nn)):
    total += int(num[i])

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 = X + int(N[i])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
origin_N = N
my_sum = 0
while True:
    my_sum += N % 10
    if (N < 10):
        print('Yes' if origin_N % my_sum  == 0 else 'No')
        break
    else:
        N = N // 10

Submission status: Accepted

Solution code:
x = int(input())
n = x
m = 0

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

if x % m == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ni = n
x = []
for i in range(10):
  x.append(ni // (10**(10 - i)))
  ni = n % (10 ** (10 - i))
x.append(ni % 10)
# print(x)
print('Yes' if n % sum(x) == 0 else 'No')

Submission status: Accepted

Solution code:
n = input()
num = 0
for i in n:
    num += int(i)

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

Submission status: Accepted

Solution code:
N = int(input())
n = N
s = 0
for i in range(10):
    a = n % 10
    s += a
    if n // 10 == 0:
        break
    else:
        n = n // 10
if N % s == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
n_ = n
s = 0 
while n_ > 0:
    r = n_%10
    s += r
    n_ = (n_-r)//10

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

Submission status: Accepted

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

Submission status: Accepted

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

x = input()
# print(f(x))
if int(x) % f(x):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
n = N

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
S=list(map(int,N))
X=sum(S)
f=int(N)/X

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

print('Yes' if is_integer_num(f) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

summ_keta = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    s = str(n)
    sum=0
    for i in s:
        sum+= int(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
X = N
f = 0

for i in range(len(str(N))):
    f += N % 10
    N = N // 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input();print(['No','Yes'][int(N)%sum([int(i) for i in N])==0])

Submission status: Accepted

Solution code:
n=input()
nx=int(n)
n=list(n)
n=[int(s) for s in n]
x=sum(n)

if nx%x==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
R = N
t = 0
while True:
  if R > 9:
    t += R%10
    R = R//10
    continue
  else:
    t += R
    break
print("Yes" if N%t == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Temp = str(N)
L = len(Temp)
Sl = list(Temp)
S = 0
for i in range(L):
    S += int(Sl[i])
if (N%S == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#HarshadNumber
n = int(input())
def hrsh(x):
  s = 0
  while x > 10:
    s += x % 10
    x = x//10
  s += x
  return s
f = hrsh(n)
#print(f)
if n % f == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()

dev = sum(list(map(int, list(str(N)))))

if N % dev:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc(n):
    sum = 0

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

    return sum


N = int(input())

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

Submission status: Accepted

Solution code:
N = input()

n = list(N)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
N = int(S)
fN = sum([int(si) for si in S])
if N%fN == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n=input()
temp=0
for i in n:
  temp+=int(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
f=0
frag='No'
for i in range(8):
  f+=n%(10**(i+1))//10**i
if n%f==0:
  frag='Yes'
print(frag)

Submission status: Accepted

Solution code:
n=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = str(n)
l = len(s)
sl = list(s)
res=0
for i in range(l):
    res += int(sl[i])

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    sum_N = 0
    judge_N = N

    while True:
        sum_N += (N%10)
        N = N//10
        if N == 0:
            break

    if (judge_N % sum_N) == 0:
        print('Yes')
    else:
        print('No')

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    FN = 0
    res = N
    while res >0:
        FN = FN + res%10
        res = res//10
    if N%FN == 0:
        print('Yes')
    else:
        print('No')
    return
main()

Submission status: Accepted

Solution code:
n = input()
l = len(n)
counter = 0
for i in range(l):
    counter += int(n[i])
n = int(n)
if n % counter == 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:
n = int(input())
f = 0
n_ = n
for i in range(len(str(n))-1,-1, -1):
    f += n_//(10**i) 
    n_ %= (10**i)

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

Submission status: Accepted

Solution code:
def digsum(x):
  ldigit = list(x)
  idigit = [int(n) for n in ldigit]
  return sum(idigit)

N = input()

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

Submission status: Accepted

Solution code:
X = int(input())
str_X = str(X)
Fx = 0
for i in str_X:
    Fx += int(i)
if X % Fx == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = input()
print("Yes" if int(n) % sum([int(x) for x in n]) == 0 else "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 = input()
print("Yes" if int(N)%(sum(map(int, N))) == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    n_f = n
    f = 0
    for i in range(8):
        if n >= 10: 
            f += n % 10
            n  = n // 10
        else:
            f += n % 10
            break
    if n_f % f == 0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def ABC_80_B():
    N=input()
    N1=list(N)
    x=0
    for i in range(len(N1)):
        x+=int(N1[i])

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


if __name__ == '__main__':

    ABC_80_B()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    s = input()
    n = int(s)
    print('Yes') if n % sum(list(map(lambda x: int(x), list(s)))) == 0 else print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
n = str(N)
l = len(n)
f = 0

for a in range(l):
    f += int(n[a])

if N%f == 0:
    print('Yes')
else:
    print('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 = input()


def digit(digits):
    result = 0
    for digit in digits:
        result += int(digit)

    return result

if int(n) % digit(n):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = str(input())
div = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
ch = n
while n!=0:
    ans += n%10
    n = n // 10
if ch % ans == 0:
    print("Yes")
else:
    print("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:
s = input()
a = 0
b = int(s)
for i in range(len(s)):
    a += int(s[i])
if b%a == 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 = input()
A = list(map(int, n))
print('Yes' if int(n) % sum(A) == 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())
num = n
total_num = 0

while num != 0:
    total_num += num % 10
    num = num // 10

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

Submission status: Accepted

Solution code:
#Harshad Number
n=int(input())
fx=0
x=n
while x>0:
    fx+=x%10
    x=x//10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Harshad Number
n=int(input())
fx=0
x=n
while x:
    fx+=x%10
    x=x//10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
x = N
f_X = 0

while x > 0:
    f_X += x % 10
    x //= 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

def digits_sum(x):
    
    s = 0
    
    while x>0:
        s += x % 10
        x //= 10
    
    return s
    
if n % digits_sum(n) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
res = sum(list(map(int,str(n))))
if n % res == 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:
N = input()
n = int(N)
sum = 0
a = list(N)
for i in range(len(a)):
    sum += int(a[i])

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
n=input()

f=sum([int(_) for _ in n])

#print(f,n)

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

Submission status: Accepted

Solution code:
s = input()
w = 0
n = int(s)

for i in range(len(s)):
  w += int(s[i])
print("Yes" if n%w == 0 else "No")

Submission status: Accepted

Solution code:
n = int(input())
ln = list(str(n))
ln = [int(n) for n in ln]

total = sum(ln)
if n % total == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = str(input())
ans = 0
for n in list(N):
    ans += int(n)

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
N_list = list(str(N))
n = 0
for i in N_list:
    n += int(i)

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

Submission status: Accepted

Solution code:
def resolve():
  n = input()
  x = int(n)
  fx = 0
  for c in n:
    fx += int(c)
  if x % fx == 0:
    print('Yes')
  else:
    print('No')

  return

if __name__ == "__main__":
  resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

M = str(N)
d = 0
for i in range(len(M)):
  d += int(M[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

total = 0
for c in str(N):
    total += int(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
n = int(s)
colsum = 0
for i in s:
    colsum += int(i)

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

Submission status: Accepted

Solution code:
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

s = stdin.readline().rstrip()
point = 0

for i in s:
    point += int(i)

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    digit_sum = 0
    now = n
    while now > 0:
        digit_sum += now % 10
        now //= 10
    print("Yes" if n % digit_sum == 0 else "No")


if __name__ == '__main__':
    main()

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:
def split_sum(n):
    ans = 0
    while n:
        ans += n % 10
        n //= 10
    return ans


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

Submission status: Accepted

Solution code:
n=input()
sum=0
for i in n:
    sum+=int(i)
if int(n)%sum==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

input = sys.stdin.readline


def main():
    N = int(input())

    f = sum(int(d) for d in str(N))
    if N % f == 0:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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