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

SN = sum([int(n) for n in N])

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

Submission status: Accepted

Solution code:
n=list(map(int,input()))
total=sum(n)
temp=""
temp=temp.join(map(str,n))
s=int(temp)
if s%total==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=k//10
if n%s==0:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
n=int(input(""))
num=[int(i) for i in str(n)]
soma = 0
for i in num:
    soma+=i
if n%soma==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 eachdigitsum(n):
	x = len(str(n))
	sum = 0
	for i in range(x):
		t = n//10**(x-i-1)
		n = n - t*10**(x-i-1)
		sum += t
	return sum

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

Submission status: Accepted

Solution code:
#input one int
#a = int(input())

#input some val
#a, b, c = (int(i) for i in input().split())
#val = [[int(i) for i in input().split()] for i in range(N)]

#input matrix
#a = [input().split() for i in range()]

N = int(input())

temp = N
Sn = 0

while(temp >= 1):
    Sn = Sn + temp%10
    temp = temp//10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import math
import sys

s = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

x = int(input())
print(["No","Yes"][x%s(x)==0])

Submission status: Accepted

Solution code:
def sum_of_digits(arg: int) -> int:
    arg_str = str(arg)
    sum_digits = 0
    for char in arg_str:
        sum_digits += int(char)

    return sum_digits


# main
input_num = int(input())

if input_num % sum_of_digits(input_num) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
sn = sum(map(int,str(n)))
print("Yes") if n % sn == 0 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:
st = input()
s = int(st)
n = 0
for i in range(len(st)):
    n += int(st[i])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc101b

s=raw_input()
n=int(s)
t=0
for i in xrange(len(s)):
 t+=int(s[i])
if n%t==0:
 print 'Yes'
else:
 print 'No'

Submission status: Accepted

Solution code:
def solve(n):
    m = n
    s = 0
    while m > 0:
        s += m % 10
        m /= 10
    return "Yes" if (n % s == 0) else "No"

assert solve(12) == "Yes"
assert solve(101) == "No"
assert solve(999999999) == "Yes"
n = input()
print solve(n)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N0 = int(input())
N1 = list(map(int,str(N0)))
S_N = 0

for i in range(len(N1)):
    S_N += N1[i]

if N0 % S_N == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
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()
sn = 0
for c in n:
  sn += int(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def sum_digit(n):
    s = str(n)
    l = list(map(int, s))
    return sum(l)


def main():
    n = read_int()
    s = sum_digit(n)
    if n % s == 0:
        res = 'Yes'
    else:
        res = 'No'
    print(res)


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=str(input())
sum=0
for i in range(len(S)):
    sum+=int(S[i])
N=int(S)
if N%sum==0:
    print("Yes")
else:
    print("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:
def func(n):
  if n < 10:
    return n
  else:
    return n%10 + int(func(n/10))
n = int(input())
if n % int(func(n)) == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def func(x):
    if (x < 10):
        return x
    else:
        return (x % 10) + func(x // 10)
    
n = int(input())
s = func(n)

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

Submission status: Accepted

Solution code:
N = int(input())

n = N
m = 0
while n:
    n, d = divmod(n, 10)
    m += d

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

#S_nを求める
S_n = 0
for i in range(len(N)):
    S_n += int(N[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def S(n):
  T=str(n)
  res=0
  for i in T:
    res+=int(i)
  return res
N=int(input())
if N%S(N)==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
from sys import stdin
ans = 'Yes'
n = int(stdin.readline())
m = n
cur = 0
while m:
 cur += m%10; m/=10
if n%cur:
 ans = 'No'
print ans

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
s = int(raw_input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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:
line = input().rstrip()

count = 0
for i in line:
    count += int(i)

if int(line) % count == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S= input().split() 
 

a=0
 
sum=0
for i in S[0]:
	
	sum=sum+int(i)
 
 
 
anser=int(S[0])%sum
 
 
 
 
 
 
if anser == 0:
	print("Yes")
 
else : print("No")

Submission status: Accepted

Solution code:
N = str(input())

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

Submission status: Accepted

Solution code:
N = input()

a = N.count('1')
b = N.count('2')
c = N.count('3')
d = N.count('4')
e = N.count('5')
f = N.count('6')
g = N.count('7')
h = N.count('8')
i = N.count('9')

total = 1 * a + 2 * b + 3 * c + 4 * d + 5 * e + 6 * f + 7 * g + 8 * h + 9 * i

N_int = int(N)

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

Submission status: Accepted

Solution code:
def S(s):
    num = 0
    for c in s:
        num += int(c)
    return num

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

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
i = 0
wa = 0
while i < len(str(N)):
    wa = wa + int(str(N)[i:i+1])
    i += 1
if N % wa == 0:
    print("Yes")
elif N % wa != 0:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())

a=[int(i) for i in list(str(n))]

s=sum(a)

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

Submission status: Accepted

Solution code:
a = int(input())
b = []
c = a
while c >= 1:
    b.append(int(c % 10))
    c /= 10
if a % sum(b) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
wa = 0
for i in a:
    wa += int(i)
a = int(a)

if a % wa == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = input()

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = 0
for lit in str(N):
    S += int(lit)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
  N_str = input()
  N_int = int(N_str)
  counter = 0
  for b in N_str:
    counter += int(b)
    
  msg = 'No'
  if N_int % counter ==0:
    msg = 'Yes'
  print(msg)

Submission status: Accepted

Solution code:
N = str(input())
sn_list = list(N)
Sn = 0
for Sns in sn_list:
    Sn = Sn + int(Sns)

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    N= int(input())
    s_n = list(map(lambda x: int(x), str(N)))
    S_N = sum(s_n)
    if N % S_N == 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

n = int(n)

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:
a=input()
b=int(a)
c=sum(map(int,list(a)))
if b%c==0:
   print("Yes")
else:
   print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == "__main__":
    n = input()
    n = int(n)
    result = digitSum(n)
    if n%result == 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

c=0
for i in tmp:
    c+=int(i)

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

Submission status: Accepted

Solution code:
N = int(input())
M = N
S = 0

for i in range(10,0,-1):
    p  =  M//10**(i)
    if p != 0:
        M = M - p*10**(i)
    S = S + p
S = S + M

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

nstr=str(n)
#print(n,nstr)

list=list(nstr)
#print(list)

a=0
for i in range(len(list)):
	a=a+int(list[i])
#print(a)
n=int(n)
a=int(a)
#print(n)
#print(a)
#print(n%a)

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

Submission status: Accepted

Solution code:
n = int(input())
tn = n
s = 0
for i in range(0, 10):
	i = 9 - i
	s += int(tn / 10**i)
	tn %= 10**i

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
l = [int(x) for x in list(str(S))]
total = sum(l)
if int(S)%total==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
num = []
tmp = n
while 1:
    if tmp == 0:
        break
    num.append(int(tmp % 10))
    tmp //= 10
s = sum(num)
if n % s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

S_N = sum([int(i) for i in N])

N = int(N)

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
#coding: utf-8

inputInt = int(input())
oriInput = inputInt
counter = 0

for i in range(0, 10):
    if inputInt >= 10**(9-i):
        i1 = int(inputInt / 10**(9-i))
        counter += i1
        inputInt = inputInt - (10**(9-i))*i1

if oriInput % counter == 0:
    print ("Yes")
else:
    print ("No")

Submission status: Accepted

Solution code:
def digitsums(N):
    digsum = 0
    for i in range(len(str(N))):
        digsum = digsum + int(N % 10)
        N = N / 10
    return digsum
N = int(input())
digsum = digitsums(N)
out = 'Yes' if N % digsum == 0  else 'No'
print(out)

Submission status: Accepted

Solution code:
N=int(input())

N1=N

ans=0

while N>0:
    ans=ans+N%10
    N=(N-N%10)//10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ns = input()

s = 0
for c in list(ns):
    s += int(c)

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

Submission status: Accepted

Solution code:
from sys import stdin
road = stdin.readline().rstrip();
b=0
for num in road:
    b = int(num) + b
if int(road) % b == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=list(input())
Nsum=0
N2=0

for i in range(len(N)):
    N[i]=int(N[i])
    Nsum+=N[i]
    N2+=N[i]*( 10** (len(N)-(i+1)) )

if N2%Nsum==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def main():
	in_n = input()
	n = str(in_n)
	num = list(map(int, list(n)))
	SUM_num = sum(num)

	if int(in_n) % SUM_num == 0:
		print('Yes')
	else:
		print('No')

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
import math 
def S(N):
    s = 0
    n = N
    while n != 0:
        s += n % 10
        n /= 10
        n = math.floor(n)
    return s


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

Submission status: Accepted

Solution code:
N=int(input())
dSum=0
tmpN=N
while tmpN>=1:
    dSum += tmpN % 10
    tmpN = int(tmpN/10)
#print(dSum)
if N % dSum == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

dig = input()
N = int(dig)

S, ans = 0, 0

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

ans = N%S

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

Submission status: Accepted

Solution code:
N = int(input())
Nt = N
S = 0
for i in range(10):
    S = S + Nt%10
    Nt = Nt // 10
if(N%S==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())
m=list(map(int,str(n)))
if n%sum(m)==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

sn=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def S_n(n):
    num = []
    sum = 0
    while n != 0:
        num.append(n % 10)
        n = int(n / 10)
    for i in num:
        sum += i

    return sum

if __name__ == "__main__" :
    num = int(input())
    wa = S_n(num)
    # print(wa)
    if(num % wa == 0):  print("Yes")
    else:  print("No")

Submission status: Accepted

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

N = int(N)

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

Submission status: Accepted

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

if n%s==0: print('Yes')
else:      print('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:
N = map(int, raw_input().split())
N_int = map(int, str(N[0]))
sum = 0

for i in N_int:
    sum += i
out = N[0]%sum
if out == 0:
    print "Yes"
else:
    print "No"

Submission status: Accepted

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

N = int(input())
S_n = S(N)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
la=[]
buff=0
for i in range(len(N)):
    la.append(int(N[i]))
buff=sum(la)
if(int(N)%buff==0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(str(N))
S2 = list(map(int, list(S)))
S3 = sum(S2)
if N % S3 == 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()
SN=0
for s in N:
	SN+=int(s)
if int(N)%SN==0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding:utf-8 -*-

N = int(input())
def digit(i):
    if i>0:
        return digit(i//10) + [i%10]
    else:
        return []

SN = sum(digit(N))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = list(map(int, input()))
s = 0
sum = 0

for i in range(len(N)):
    sum += N[i]
    s += pow(10, len(N)-i-1) * N[i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = 0
N = n
while(N != 0):
    s += N % 10
    N = int(N / 10)

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

Submission status: Accepted

Solution code:
N = int(input())

def S(N):
	s = 0; t = N
	while t != 0:
		s = s + (t % 10)
		t = t//10
	return s

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M = input()
N = [int(x[:1]) for x in M]
#print(M,N)
sn = sum(N)
M = int(M)
if M % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()

list_N = list(N)
sum = 0

for now in list_N:
  sum += int(now)

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

Submission status: Accepted

Solution code:
N = int(input())
N = str(N)
S=[]
for i in range(len(N)):
  S.append(N[i])

S = [int(n) for n in S]
print("Yes" if int(N)%sum(S)==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()
m = 0 
for i in n:
    m += int(i)
if int(n)%m==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = int(input())
b_ori = b
su = 0
for k in range(10):
    su += b % 10
    b /= 10
    b = int(b)
if b_ori % su == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

def main():

    a=input()
    a2=[int(x) for x in list(str(a))]
    c=int(0)
    
    for b in a2:
        c=c+b

    if int(a)%c == 0:
        print("Yes")
    else:
        print("No")
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

Solution code:
import sys
import math

imp = raw_input()
num = imp.strip()
S = 0
for a in num:
    S += int(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main14():
    strbuf = input('');
    num = int(strbuf);
    kari = num;
    peku = 0;
    while(True):
        iti = int(kari % 10);
        peku = peku + iti;
        if(kari<10):
            break;
        kari = (kari - iti) / 10;
    if((int(num % peku) == 0)):
        print("Yes");
    else:
        print("No");

def main15():
    strbuf1 = input('');
    strbuf2 = input('');
    buf1 = [];
    buf2 = [];
    for i in range(2):
        buf1.append(int(strbuf1[i]));
    for i in range(buf1[0]):
        buf2.append(int(strbuf2[i]));


if __name__ == '__main__':
    main14()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

nlist = list(N)

listsum = 0

for num in nlist :
    listsum += int(num)
    
if int(N) % listsum == 0:
    print("Yes")
else :
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
Nt = N
s=0
for i in range(10):
  s += N%10
  N //=10

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

Submission status: Accepted

Solution code:


def main():
    num_str = input()
    num_int = int(num_str)
    num_list = list(num_str)
    num_list = [int(n) for n in num_list]
    #print(num_str)
    #print(sum(num_list))
    if num_int % sum(num_list) == 0: print("Yes")
    else: print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
s = [n[i:i+1] for i in range(len(n))]

w = 0
N = int(n)

for ss in s:
    w += int(ss)

b = N % w

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
sum = 0

list = [int(x) for x in list(str(n))]

for i in range(len(list)):
    sum = sum + list[i]

else:
    if n % sum == 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])
print("Yes" if int(N) % sum == 0 else "No")

Submission status: Accepted

Solution code:
N = int(input())

N_list = list(str(N))

cc = 0

for i in N_list:
  cc += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    def dig_sum(x):
        return sum(list(map(int, [i for i in str(x)])))
    N = int(input())
    if (N / dig_sum(N)) % 1 == 0:
        print("Yes")
    else:
        print("No")
    return 0
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

s = input()

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

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

Submission status: Accepted

Solution code:
N = input()
s = 0

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

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

Submission status: Accepted

Solution code:
n = raw_input()
l = list(n)

s = 0

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

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

Submission status: Accepted

Solution code:
# https://beta.atcoder.jp/contests/abc101/tasks/abc101_b
# B - Digit Sums

# B_Digit_Sums.py

N = int(input())
str_N = str(N)

S_N = 0
for i in range(len(str_N)):
    S_N += ( N % (10 ** (i+1)) ) // (10 ** i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created: 土  6/23 21:14:29 2018

# Usage
#
"""
import sys
def get_input():
    line = sys.stdin.readline()

    return line.rstrip()

def sum_digit(target: str):
    """
    >>> sum_digit("190")
    10
    >>> sum_digit("0")
    0
    """
    sumup = 0
    for digit in target:
        sumup = sumup + int(digit)

    return sumup

def check_sum(target, sumup):
    """
    >>> target = "999999999"
    >>> check_sum(target, sum_digit(target))
    Yes
    >>> target = "101"
    >>> check_sum(target, sum_digit(target))
    >>> target = "12"
    >>> check_sum(target, sum_digit(target))
    """

    target = int(target)

    try:
        if target % sumup == 0:
            print("Yes")
        else:
            print("No")
    except ZeroDivisionError:
        print("No")

if __name__ == '__main__':
    stdin = get_input()
    check_sum(stdin, sum_digit(stdin))

Submission status: Accepted

Solution code:
n = input()

sn = 0

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


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

Submission status: Accepted

Solution code:
n = input()

intn = int(n)

sum_ = 0
for nn in n:
    sum_ += int(nn)

if intn % sum_ == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N =  int(input())
S = 0
for digit in list(str(N)):
    S += int(digit)

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

Submission status: Accepted

Solution code:
a = int(input())
lis = list(str(a))

b = 0
for i in lis:
  b += int(i)

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

Submission status: Accepted

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