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:
S=input()
count=0
for i in range (len(S)):
    count+=int(S[i])

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

Submission status: Accepted

Solution code:
N=int(input())
Nstring=str(N)
i=0
S=0#各桁の輪
while i<len(Nstring):
    S+=int(Nstring[i])
    i+=1

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

Submission status: Accepted

Solution code:
def sumdigits(n):
    result=0
    while n!=0:
        result+=n%10
        n=int(n/10)
    return result

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

Submission status: Accepted

Solution code:
#encoding:utf-8
N=str(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:


if __name__ == "__main__":
    N = input()
    Sn = 0
    for i in N:
        Sn += int(i)
    if (int(N)%Sn) == 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

s = int(input())
tmp = s % 10
sn = tmp
tmp1 = math.floor(s /10)
while tmp1 >0:
    tmp = tmp1 % 10
    sn += tmp
    tmp1 = math.floor(tmp1/10)
if s % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

SN = sum(int(c) for c in N)

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

Submission status: Accepted

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

print(m())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n_str = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()
stri = int(str) 
si = 0

for i in str:
    si = si + int(i)
 
if(stri%si == 0):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

def clacSumN(n):
    sum_n = 0
    for i in reversed(range(9)):
        sum_n += int(n / (10 ** i))
        n = n % (10 ** i)
    return sum_n

def check(n,sum_n):
    flag = not (n % sum_n)
    if flag == True:
        result = "Yes"
    else:
        result = "No"

    return result 

if __name__ == "__main__":
    n = int(input())
    sum_n = clacSumN(n)
    
    print(check(n,sum_n))

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
N = int(input())
s = str(N)
res = 0
i = 0
while i < np.log10(N):
    res += int(s[i])
    i+= 1
if N % res == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if __name__ == '__main__':
    n = int(input())

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

Submission status: Accepted

Solution code:
n = input()
sn = 0

for i in n:
    a = int(i)
    sn += a
b = int(n) % sn
if b == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from sys import stdin

N = stdin.readline().rstrip()

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()
x = list(map(int,list(n)))
y = sum(x)
if int(n) % y == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
lines = input()
count = 0
for line in lines:
    count += int(line)
if int(lines) % count == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

a = sum(list(map(int, list(n))))

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input().strip()
    n = int(s)
    c = 0
    for i in s:
        c += int(i)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
if len(n)==10:
    a=n
elif len(n)==9:
    a="0"+n
elif len(n)==8:
    a="00"+n
elif len(n)==7:
    a="000"+n
elif len(n)==6:
    a="0000"+n
elif len(n)==5:
    a="00000"+n
elif len(n)==4:
    a="000000"+n
elif len(n)==3:
    a="0000000"+n
elif len(n)==2:
    a="00000000"+n
elif len(n)==1:
    a="000000000"+n
count=0
#print(a)
for i in range(10):
    count=count+int(a[i])

#print(count)

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

Submission status: Accepted

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

l = input()

S=0

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

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

Submission status: Accepted

Solution code:
tmp = input()

N = [int(a) for a in list(tmp)] 

S_N = sum(N)

if int(tmp) % S_N == 0:
	print("Yes")
else:
 	print("No")

Submission status: Accepted

Solution code:
N = int(input())
num = [int(i) for i in list(str(N))]
Sn = 0

for j in range(len(num)):
    Sn += num[j]

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

Submission status: Accepted

Solution code:
N = raw_input()

string = N
num = int(N)
chars = list(string)


sum1 = 0

for i in range(len(chars)):
    sum1 = sum1 + int(chars[i])

ans = num%sum1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

n_str = str(n)
s = 0
for ns in n_str:
    s += int(ns)

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

Submission status: Accepted

Solution code:
n = str(input())
num = 0

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


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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
tmp = list(str(N))
SN = 0
for x in tmp:
    SN += int(x)

# print(N,tmp,SN)
if N % SN == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = 0
divid = N
while divid != 0:
    amari = divid % 10
    divid = int(divid / 10)
    S += amari


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

Submission status: Accepted

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

k = 0

for i in n:
  t = int(i)
  k += t
  
if N % k == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def digitsum(n):
	d_sum = 0
	while n > 0:
		d_sum += n%10
		n = int(n/10)
	return d_sum

n = int(input())
s = digitsum(n)

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

Submission status: Accepted

Solution code:
input_str = input()
sum = 0
for dig in input_str:
    sum += int(dig)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
intn = int(n)
i = 0
while(n != ""):
    i += int(n[0])
    n = n[1:]
print("Yes" if intn % i == 0 else "No")

Submission status: Accepted

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


def main(input_str):
    # bit = bin(int(input_str))
    # l = list(map(int, list(bit[2:])))
    l = list(map(int, list(input_str)))
    # print(sum(l))
    if int(input_str) % sum(l) == 0:
        print('Yes')
    else:
        print('No')
    


if __name__ == '__main__':
    try:

        main(input().strip())
    except EOFError:
        pass

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
S = str(input())
#print(S[0])
sn=0
for i in S:
    sn+=int(i)

if int(S)%sn==0:
    print("Yes")
elif int(S)%sn!=0:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

sum_N = list(map(int, list(str(N))))

sum_N = sum(sum_N)

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

Submission status: Accepted

Solution code:
s = input()
n = int(s)
sn = 0
for t in s:
    sn += int(t)

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

Submission status: Accepted

Solution code:
n = int(input())
sn = 0
n_tmp = n

while True:
    if(n_tmp == 0):
        break
    sn += n_tmp % 10
    n_tmp = n_tmp // 10

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

Submission status: Accepted

Solution code:
import math
import numpy as np

Nstr = input()
N = int(Nstr)
S_N = 0

for n in Nstr:
    S_N += int(n)

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

Submission status: Accepted

Solution code:
n = input()
nlist = list(str(n))

sn = 0
for i in nlist:
    sn += int(i)

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

Submission status: Accepted

Solution code:
N = int(input())

keta = []
t = N
while t > 0:
    keta.append(t%10)
    t //= 10
wa = sum(keta)

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

Submission status: Accepted

Solution code:
# coding : utf-8

N = input()

Nint = int(N)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

def gen(n):
  if n < 10:
    yield n
  else:
    for m in gen(n/10):
      yield m
    yield n%10

num = [int(i) for i in gen(N)]

SN = 0
for i in num:
    SN += i

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = int(s)
num = 0
s = list(s)
for i in range(len(s)):
    num += int(s[i])

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

Submission status: Accepted

Solution code:
n = int(input())
m = n
sum = 0
length = len(str(n))

for i in range(length):
    sum += m % 10
    m = m // 10


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [(input_raw[0])]
    a = 0
    for s in N:
        a += int(s)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

Nlist = [0 for i in range(10)]

Ntmp = N
for i in range(10):
    Nlist[i] = Ntmp % 10
    Ntmp = Ntmp // 10

sum = 0
for i in range(10):
    sum = sum + Nlist[i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = input()

S = 0

for num in list(N):
    S = S + int(num)

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = digit_sum(n)

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

def digit_sum(n):
    s = 0
    while n != 0:
        r, m = divmod(n, 10)
        s += m
        n = r
    return s


main()

Submission status: Accepted

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

N = int(input())

num = N
sum1 = 0
while num != 0:
    sum1 += num % 10
    num //= 10
if N % sum1 == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

input = stdin.readline().rstrip()
n_list = list(input)
n = int(input)

s_n = 0
for i in n_list :
    s_n = s_n + int(i)

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

Submission status: Accepted

Solution code:
N_raw = input()
N = int(N_raw)
Sn = sum([int(i) for i in list(N_raw)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
l = [int(x) for x in list(str(num))]
if(num % sum(l) == 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:
N0=int(input())
N=N0
S=0
for i in range(10):
    S = S + N%10
    N = N //10
amari=N0 % S
if amari == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
strN = str(N)
sum = 0
for i in strN:
    sum += int(i)

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

Submission status: Accepted

Solution code:
S = input()
sum = 0
for c in S:
    num = int(c)
    sum += num
if int(S) % sum == 0.0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()
S = 0

for _ in N:
    S += int(_)

if int(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:
def digitSum(n):
  s = str(n)
  array = list(map(int, list(s)))
  return sum(array)
n = int(input())
if n % digitSum(n) == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n = I()
s = 0
for e in str(n):
    s += int(e)
if n%s == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()

def func(s):
    x = 0
    for i in s:
        x += int(i)

    return x

if int(s) % func(s):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
N = raw_input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
N = input()
n_list = list(map(int, list(N)))
if int(N)%sum(n_list) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

x = input()

y = int(x)

z = 0

for i in x:
    z += int(i)
    
if(y%z == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline())

SN = 0
tmp = N

while tmp > 0:
    SN += tmp % 10
    tmp = tmp // 10

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

Submission status: Accepted

Solution code:
n = input()

def sum_digit(num):
    # num (str)
    digits = len(num)
    return sum([int(c) for c in num])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8


inp = input()
n = int(inp)

s = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
#print(S)
#i = 0
a = str(S)
sum=0
for e in a:
    sum+=int(e)
#print(S)
#print(sum)
if int(S) % sum==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Nc = N
temp = []
while(True):
	if(N != 0):
		temp.append(N%10)
		N //= 10
	else:
		break

ans = sum(temp)
if(Nc % ans == 0):
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
N = str(input().strip())
SUM = 0
for i in N:
    SUM = SUM + int(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_n = input('')

sum_digit = 0
for digit in str_n:
    sum_digit += int(digit)

if int(str_n) % sum_digit == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    # input    
    N = int(input())

    # 1.find S(N)
    res = N
    digit = []
    while res//10 != 0:
        digit.append(res%10)
        res = res//10
    digit.append(res)
    sn = sum(digit)

    #2. judge  
    if N%sn == 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = input()
list = [int(i) for i in n]
N = int(n)
m = 0

for i in list:
    m += i

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

Submission status: Accepted

Solution code:
n_str = input()
n_int = int(n_str)

S_n = 0
for s in n_str:
    S_n += int(s)

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

Submission status: Accepted

Solution code:
q="B"
if q=="A":
	S=input()
	print(sum((i=="+")-(i=="-")for i in S))
if q=="B":
	a=int(input())
	b=sum(int(i) for i in str(a))
	print("Yes" if a%b==0 else "No")

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
S = 0
for i in range(10):
    S += N // 10**i % 10
if N % S == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = str(input())

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

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

Submission status: Accepted

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

print "Yes" if N%a==0 else "No"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 23 20:51:56 2018
ABC101B
@author: maezawa
"""

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    N = stdin.readline().rstrip()
    sum_ = 0
    for x in N:
        sum_ += int(x)
    print('Yes' if int(N) % sum_ == 0 else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()

n_int = int(n)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#acb101c

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:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np

n =int(input())
t = n
sn=0
while t > 0:
    sn += t % 10
    t = t // 10
if n % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

sum_N = 0
for n in N_list:
    sum_N += n

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())

s = str(N)
array = list(map(int, list(s)))
res = sum(array)


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

Submission status: Accepted

Solution code:
import sys
if __name__ == "__main__":
    N = int(input())
    factor_N = [int(x) for x in list(str(N))]
    sum_N = sum(factor_N)
    if N % sum_N == 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

if(int(N) % Sn == 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')

Submission status: Accepted

Solution code:
# Q_B
N = input()

SN = 0
for i in N:
    i = int(i)
    SN += i
    
N = int(N)
if N % SN == 0:
    re = "Yes"
else:
    re = "No"

print(re)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    n = input()
    a = list(map(int, list(n)))
    ans = int(n)%sum(a)
    if ans:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

N = input()
lens = len(N)
N = int(N)
N2 = N
sn = 0
for i in range(lens-1, -1, -1):
    sn += N // 10**i
    N %= 10**i
if N2 % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# coding=utf-8

N = int(input())
N_memo = N
S = 0

while True:
    if N < 10:
        S += N
        break
    else:
        S += (N % 10)
        N = N // 10

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N=input()

nagasa=len(N)
Sn=0
for i in range(nagasa):
    Sn+=int(N[i:i+1])

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

Submission status: Accepted

Solution code:
n = str(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 = int(input())

s = str(n)
sn = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x_str = input()
x = int(x_str)

s_x = 0
for e_str in x_str:
    s_x += int(e_str)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_n = input().rstrip()
n = int(str_n)

sn = 0
for c in str_n:
    sn += int(c)

if n % sn == 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()
l = list(N)
w = 0
res = 'No'
for i in range(len(l)):
    w += int(l[i])

if int(N)%w == 0:
    res = 'Yes'

print(res)

Submission status: Accepted

Solution code:
A = input()

a_sum = 0
for i in A:
    a_sum += int(i)
if int(A) % a_sum == 0:
    print("Yes")
else:
    print('No')

Submission status: Accepted

Solution code:
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write

def main():
    N = input()

    Sn = sum(map(int, list(N)))
    if int(N) % Sn:
        write('No\n')
    else:
        write('Yes\n')

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

temp = N
sum = 0
while(temp>=1):
  sum += temp % 10
  temp = temp // 10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_n = input()

s_n = sum(map(int, str_n))

if int(str_n) % s_n == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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