Problem:


Score : 200 points

Problem Statement

Let S(n) denote the sum of the digits in the decimal notation of n.
For example, S(101) = 1 + 0 + 1 = 2.

Given an integer N, determine if S(N) divides N.

Constraints

1 \leq N \leq 10^9

Input

Input is given from Standard Input in the following format:

N

Output

If S(N) divides N, print Yes; if it does not, print No.

Sample Input 1

12

Sample Output 1

Yes

In this input, N=12.
As S(12) = 1 + 2 = 3, S(N) divides N.

Sample Input 2

101

Sample Output 2

No

As S(101) = 1 + 0 + 1 = 2, S(N) does not divide N.

Sample Input 3

999999999

Sample Output 3

Yes



Sample input:
12


Sample output:
Yes

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = input().rstrip()
S = 0
for n in N:
    S += int(n)
print("Yes" if (int(N) % S == 0) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = n
b = []
while n:
    b.append(n%10)
    n = n // 10

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

Submission status: Accepted

Solution code:
N = input()

sn = 0
for n in N:
    sn += int(n)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
n = len(s)
ans = 0
for i in range(n):
  ans += int(s[i])
if int(s) % ans == 0:
  print("Yes")
else:
  print("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:
a = input()
x = int(a)
b = 0
for s in a:
  b += int(s)
if x%b==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = input()

s = sum(map(int, n))
n = int(n)

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

Submission status: Accepted

Solution code:
n = input()

s = 0

for i in n:
	s += int(i)
	
	
mod = int(n) % s

if mod == 0:
	print('Yes')
else:
	print('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:
N = list(input())
t = 0
for n in N:
    t += int(n)
if int(''.join(N)) % t == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = str(n)
num = 0
for st in s:
  num += int(st)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

sn =0
strn = list(str(n))
for i in strn:
    sn += int(i)

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

Submission status: Accepted

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

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

print('No' if N % sum else 'Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

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

n = int(s)

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

Submission status: Accepted

Solution code:
# ABC 101: B – Digit Sums
n = input()

digits = list(n)

sum_of_digits = 0
for digit in digits:
    sum_of_digits += int(digit)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(x):
  if x<10:
    return x
  else:
    a = x%10
    x//=10
    return a+f(x)
n = int(input())
a = f(n)
if n%a==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
total = 0

for n in str(N):
    total += int(n)

if N % total == 0:
    ans = "Yes"
else:
    ans = "No"

print(ans)

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 = str(input())
a = 0
b = 0
i = 0
ans='Yes'
while i<len(N):
    a = a+int(N[i])*10**(len(N)-i-1)
    b = b+int(N[i])
    i+=1
if a%b!=0:
    ans='No'
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

N_strlist = list(str(N))
N_digit = 0
for i in range(len(N_strlist)):
    N_digit += int(N_strlist[i])

if N % N_digit == 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:
#!/usr/bin/env python3
import sys
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

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

Submission status: Accepted

Solution code:
N = int(input())


def S(N):
    return sum(map(int, list(str(N))))


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

Submission status: Accepted

Solution code:
n=int(input())

s,t=0,n
while t>0:
  s += t%10
  t //= 10

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

Submission status: Accepted

Solution code:
s=input()
z=list(s)
r=int(s)
for i in range(len(z)):
    z[i]=int(z[i])
if r%sum(z)==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()
s=0
for i in n:
    s=s+int(i)
if int(n)%s==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#                         author:  kagemeka 
#                         created: 2019-11-08 13:38:56(JST)
## internal modules
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator
## external modules
# import scipy.special   # if use comb function on AtCoder, 
# import scipy.misc      # select scipy.misc.comb (old version) 

def main():
    n = sys.stdin.readline().rstrip()
    s = sum([int(d) for d in n])
    print('Yes' if int(n) % s == 0 else 'No')


if __name__ == "__main__":
    # execute only if run as a script
    main()

Submission status: Accepted

Solution code:
n = input()
cnt = 0

for i in n:
    i = int(i)
    cnt += i

print('Yes' if int(n) % cnt == 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:
# ABC101 B - Digit Sums
# 2019/11/07

N = int(open(0).read())
# print(N)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
M = N
S = 0
while N > 0:
  S += N%10
  N = int(N/10)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = input()
n = len(N)
S = 0
for i in range(n):
  S += int(N[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
def S(n):
  if n<10:
    return n
  return n%10+S(n//10)
    
print('Yes' if int(N)%int(S(N))==0 else 'No')

Submission status: Accepted

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

sn = sum([int(_) for _ in list(s)])
print('Yes' if n % sn == 0 else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=int(input())

num_list=list(map(int,list(str(s))))

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

Submission status: Accepted

Solution code:
N = int(input())
S = str(N)
total = 0
for i in range(len(S)):
  total += int(S[i])
if N % total == 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())
M=list(str(N))
S=0
for i in range(len(M)):
    S+=int(M[i])
if N%S==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':

	N = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = list(input())
s = int("".join(n))
n_sum =  sum([int(i) for i in n])
if s % n_sum == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
org = n = int(input())
sum_digs = 0

while n:
  n, rem = divmod(n, 10)
  sum_digs += rem
print("Yes" if org%sum_digs == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
res = 0

for s in n:
    res += int(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N=int(input())
print('Yes' if N%S(N)==0 else '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()
print('Yes') if int(N) % sum(map(int, list(N))) == 0 else print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
l = len(n)
n = int(n)
b = n
a = [0]*l
for i in range(l-1,-1,-1):
    a[i] = n // 10**i
    n = n - a[i]*10**i
s = sum(a)
if b % s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def resolve():
    SN=input()
    N=int(SN)
    sn=sum([int(i) for i in SN])
    if N%sn==0:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    resolve()

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())

x = N
S = 0
while x:
    q,r = divmod(x,10)
    x=q; S+=r

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

Submission status: Accepted

Solution code:
N = input()
S = 0
for n in map(lambda c : int(c), N):
	S = S + n

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math 
n = int(input())
a = n

res = 0
digit = math.log10(n)

for i in range(int(digit),-1,-1):
    res += int(a / (pow(10,i)))
    a %= pow(10,i)

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

Submission status: Accepted

Solution code:
n = input()
n_i = int(n)

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

if n_i % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline


def main():
    N = input()[:-1]
    S = sum([int(N[i:i+1]) for i in range(len(N))])
    if int(N)%S==0:
        print('Yes')
    else:
        print('No')
    
            

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = input()
A = int(N)
B = []
for i in N:
    B.append(int(i))

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = str(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=input()
n_list=list(map(int,N))
n=int(N)
s=sum(n_list)
print('Yes' if n%s==0 else 'No')

Submission status: Accepted

Solution code:
N = int(input())

def S(x) :
    ret = 0
    while x :
        ret += x % 10
        x //= 10
    return ret

if N % S(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();print('Yes' if int(n) % sum(int(n[i]) for i in range(len(n))) == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
N = int(n)
S = sum(list(map(int,list(n))))
print("Yes") if N%S == 0 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()

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

if int(N) % num == 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=int(input())
S=0
K=N
while K != 0:
  S+=K%10
  K //= 10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    n = input().strip()
    v = sum([int(i) for i in n])
    n = int(n)
    print("Yes" if n % v == 0 else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

if n/sum == round(n/sum):
    print('Yes')
else:
    print('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:
#101b
N = str(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:
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())
n=N
m=0
while n>0:
    m+=n%10
    n=n//10
print("Yes") if N%m==0 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:
s = input()
if int(s)%sum([int(i) for i in s]) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = input()

S = 0
for n in N:
    S += int(n)

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

Submission status: Accepted

Solution code:
n =input()
d =[str(i) for i in str(n)]
f =[int(i) for i in d]
print('Yes' if int(n)%sum(f)==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)%int(s) == 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()
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()
Sn = 0
for i in range(len(S)):
    Sn += int(S[i])
if int(S) % Sn == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(str(n))
sums = 0
for i in s:
  sums += int(i)
  
if n/sums == round(n/sums):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N=input()
ans=[0]*len(N)
cal=0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

digit_sums = sum([int(n) for n in N])
if int(N) % digit_sums == 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 = int(input())
s = sum(list(map(int, str(n))))
if n % s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

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().strip()
print('Yes' if int(N) % sum(map(int, N)) == 0 else '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=input()
s=0
for i in range(len(n)):
  s=s+int(n[i])
print(("No","Yes")[int(n)%s==0])

Submission status: Accepted

Solution code:
N = int(input())
n = N
result = 0
for i in range(1,len(str(N))+1):
    result = result + n //(10**(len(str(N))-i))
    n = n % (10**(len(str(N))-i))
if N % result == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

def S(i):
  s = str(i)
  array = list(map(int, s))
  return sum(array)

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

Submission status: Accepted

Solution code:
N = input()
sn = sum(map(int, list(N)))
print("Yes" if int(N)%sn == 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:
N = input()
Sn = 0
for n in list(N):
    Sn += int(n)
if int(N) % Sn == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
nn = n
a = 0
while n > 0:
    a += n % 10
    n = n // 10
if nn % 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:
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 = int(input())
temp = str(n)
total =	0

for c in temp:
    total += int(c)

if n % total ==	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])
print('Yes' if int(N) % S == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

s = sum(map(int, N))

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

Submission status: Accepted

Solution code:
n = input()
nStrSum = 0
for i in range(len(n)):
    nStrSum += int(n[i])
print("Yes" if int(n) % nStrSum == 0 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:
N=input()
c=0
for i in range(len(N)):
  c+=int(N[i])
print('Yes' if int(N)%c==0 else 'No')

Submission status: Accepted

Solution code:
N = input()
S = [int(i) for i in N]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

num = int(input())
print("Yes" if num % digit_sum(num) == 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 = input()
src = list(n)
count = 0
for s in src:
    count += int(s)
if int(n) % count == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input().strip())

def calc_digit_sum(num):
    ret = 0
    while num > 0:
        ret += num % 10
        num //= 10

    return ret

print('No' if N % calc_digit_sum(N) else 'Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
N = int(s)
ss = list(s)
sn = 0
for i in range(len(ss)):
  sn += int(ss[i])

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    x = 0
    n = N
    while n > 0:
        x += n%10
        n //= 10
    if N%x == 0:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
n_s = []
for c in str(n):
    n_s.append(c)
n_l = [int(s) for s in n_s]
c = 0
for i in n_l:
    c = i + c

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

Submission status: Accepted

Solution code:
N = int(input())

S = 0
tmp = N
while tmp > 0:
    S += tmp%10
    tmp //= 10
if N%S == 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 = input()
N_int = int(N)
n_sum = 0
for i in range(len(N)):
    n_sum += int(N[i])

if N_int % n_sum == 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("Yes" if n%a == 0 else "No")

Submission status: Accepted

Solution code:
n = list(input())
a = 0

for i in n:
    a += int(i)

N = int(''.join(n))

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

Submission status: Accepted

Solution code:
N=int(input())
n=N
sum=0
while(N>0):
  sum+=N%10
  N=N//10
if 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:
N = int(input())


print("Yes" if N%sum(map(int, str(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:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

def sumDigits(n):
    sum = 0
    while n > 0:
        sum += n%10
        n = n // 10
    return sum
N = II()
Sn = sumDigits(N)
if N%Sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()
sum = 0

n = list(N)
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 = input()

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

n = int(n)

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