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()
ans = int(n) % sum(map(int, n)) == 0
print("Yes" if ans else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = []
for i in range(10):
    x = ((N - (N % (10**i))) / (10**i)) % 10
    L.append(x)
sn = int(sum(L))
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])

print('Yes' if int(n)%s==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())
s = sum(list(map(int, str(n))))
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)
print('YNeos'[int(n)%s!=0::2])

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 = 0
for i in list(str(n)):
    sn += int(i)
if n % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

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

    print("Yes" if n % sum([int(i) for i in str(n)]) == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(str(a))
c = sum(list(map(int,b)))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum1 = sum(list(map(int,x)))

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
#h, w = map(int,input().split())
#ls = list(map(int,input().split()))
#ls = [list(map(int,input().split())) for i in range(n)]
#ls = [input() for i in range(h)]
#n = input()
sum = sum(list(map(int,list(str(n)))))
if n%sum == 0:
  print("Yes")
  quit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

def keta(n):
    S = str(n)
    sum = 0
    for s in S:
        sum += int(s)
    return sum

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

Submission status: Accepted

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

s = 0
for i in range(len(n_s)):
    s += (n // (10**i)) % 10

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=input()
p=0
m=0
while True:
    m+=int(n[p])
    p+=1
    if p==len(n):
        break
if int(n)%m==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# n がS(n)で割り切れるかどうか判定
# S(n) = 各桁の数字

n = input()
s_n = sum([int(x) for x in n])
if int(n) % s_n:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
n=int(input())

#数字を桁ごとに分解
nums=[int(i) for i  in list(str(n))]

#print(nums)
s=sum(nums)

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

Submission status: Accepted

Solution code:
n = str(input())

d = sum([int(i) for i in n])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
nn=n
sum=0
for i in range(10):
    d=nn//10**(9-i)
    sum+=d
    nn=nn-d*10**(9-i)
if n%sum==0:
    print("Yes")
else:print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

int_N = int(N)
sum_N = sum([int(n) for n in list(N)])

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

Submission status: Accepted

Solution code:
N = input()
nums = list(N)
count = 0
for i in nums:
  count += int(i)

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

Submission status: Accepted

Solution code:
n = int(input())

s = list(map(int,str(n)))
sn =sum(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

def s(x):
    y = str(x)
    tmp = 0
    for i in range(len(y)):
        tmp += int(y[i])
    return tmp

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 
N1= int(input())
N2= list(str(N1))
L= len(N2)
S= 0
for i in range(0, L):
    S= S+int(N2[i])

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


#〜〜〜・〜〜〜・〜〜〜・〜〜〜・〜〜〜・〜〜〜・〜〜〜
# "input()"：入力する箱を作る
# "int()":数字として扱う
# "len()":リストの個数を調べる
#
#
#

Submission status: Accepted

Solution code:
N = int(input())

def f(S) :
    res = 0
    for s in str(S) :
        res += int(s)
    return res

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

Submission status: Accepted

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

res='No'
 
if int(n)%sm==0:
	res='Yes'

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = input()
    sum = 0
    for digit in N:
        sum += int(digit)
    if int(N) % sum == 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = s()

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

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

Submission status: Accepted

Solution code:
N = int(input())
list_S = []
num = len(str(N))
count = N
for i in range(1, num + 1):
    q = count // (10 ** (num - i))
    list_S.append(q)
    count = count % (10 ** (num - i))
if N % sum(list_S) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = input()

N_int = int(N)

S = 0

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


if N_int % S == 0:
    print("Yes")

else:
    print ("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
a=N
b=[]
T=0
while a>0:
    b.append(a%10)
    a//=10
for i in range(len(b)):
    T += b[i]
if N%T==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
s = sum([int(v) for v in list(str(N))])

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

Submission status: Accepted

Solution code:
n = input()

s = sum(map(int,n))

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

Submission status: Accepted

Solution code:
a = list(input())
num = int("".join(a))

val = 0
for i in a :
    val += int(i)

if (num % val == 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())

tmp = n
s = 0
while tmp > 0:
  s += tmp % 10
  tmp = tmp // 10

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

Submission status: Accepted

Solution code:
def abc():
    n = input().rstrip()
    s = sum(map(int, n))
    print('No' if int(n) % s else 'Yes')


abc()

Submission status: Accepted

Solution code:
n=list(input())

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

Submission status: Accepted

Solution code:
n = input()
lst = []
for i in n:
    lst.append(i)
ans = 0
for i in lst:
    ans += int(i)

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

Submission status: Accepted

Solution code:
S = input()
N = int(S)
S_N = sum([int(c) for c in S])

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

Submission status: Accepted

Solution code:
import math

n = list(map(int, input().split()))
n = n[0]

total=0
m=n
for i in range(11):
    total += m%10
    m = m//10
    
if(n%total==0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a = int(input())

b = str(a)
bsum = 0

for i in b:
    bsum = bsum + int(i)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

S = sys.stdin.readline().rstrip()

N = int(S)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from functools import reduce
from operator import sub

N = input()
S = reduce(lambda a, b: int(a) + int(b), N)
int_n = int(N)
print('Yes' if int_n % S == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
N = int(input())
original_N = N
D = []
while N > 0:
  D.append(N % 10)
  N //= 10
D = [int(d) for d in D]
S = sum(D)
if original_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 = input()
SN = sum([int(i) for i in N])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = 0
for i in list(str(n)):
    s += int(i)
if n%s == 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:
N=int(input())
n=N
l=[]
while n>0:
  l.append(n%10)
  n//=10
print("Yes" if N%sum(l)==0 else "No")

Submission status: Accepted

Solution code:
N = input()
ans = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
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:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	N = list(input())
	
	
	to = 0
	NN = ""
	for i in N:
		to += int(i)
		NN += i
	
	if int(NN) % to == 0:
		print("Yes")
	else:
		print("No")
	
	
if __name__ == "__main__":
	main()

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()
n = int(N)
sn = 0

for i in range(len(N)):
    sn += int(N[i])
    
if n%sn == 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:
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()
l=len(n)
s=0
for i in range(l):
  s+=int(n[i])
if int(n)%s==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

    sum_digit = 0
    tmp_N = N
    while tmp_N > 0:
        sum_digit += tmp_N % 10
        tmp_N = tmp_N//10

    if N % sum_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])

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

Submission status: Accepted

Solution code:
number = input()
sum = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
S=0
for i in list(N):
  S=S+int(i)
if int(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())

def digits(n):
    if n < 10:
        return n
    else:
        return n%10 + digits(int(n/10))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inputs=input()
len = len(inputs)
int_inputs = int(inputs)
sum=0
for inputc in inputs:
    sum = sum + int(inputc)

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

Submission status: Accepted

Solution code:
import numpy as np
string = input()
sn = np.array([int(s) for s in string]).sum()
if int(string) % sn == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
n = str(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()
s=sum(int(i) for i in n)
print("No" if int(n)%s else "Yes")

Submission status: Accepted

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

SN = 0
n = N
for i in range(10):
	SN += n // 10**(9 - i)
	n = n % 10**(9 - i)

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

Submission status: Accepted

Solution code:
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=str(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:
i = input()
N = int(i)
S = sum(int(c) for c in i)
print("Yes" if N % S == 0 else "No")

Submission status: Accepted

Solution code:
K = input()

intk=int(K)
kcop=intk
S=0
for i in range(1,len(K)+1):
  S+=kcop%10
  kcop=kcop//10
  #print(S,kcop)
if intk%S==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 入力
N=input()

# 各桁の和を求める
sm=sum([int(x) for x in N])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
N = int(raw_input())
sum = 0
m = N
while m != 0:
	sum += m%10
	m /= 10
if N % sum == 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 = input()
n1 = 0
for i in n:
    n1 += int(i)
if int(n) % n1 == 0:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int):
    print(YES if N % sum(map(int,list(str(N)))) == 0 else NO)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

print(ans)

Submission status: Accepted

Solution code:
n = str(input())

sum = 0

for i in list(n):
    sum += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_str=input()
input_int=int(input_str)
s=0
for z in input_str:
  z=int(z)
  s+=z

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=list(input())
k=len(n)
s=0
t=0
for i in range(k):
    s+=int(n[i])
for l in range(k):
    t+=int(n[l])*10**(k-1-l)
if t%s==0:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())

def s(k):
	sum=0
	st=str(k)
	for i in range(len(st)):
		sum+=int(st[i])
	return sum

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def get_sumd(n):
    return 0 if n == 0 else n%10 + get_sumd(n//10)

def solve():
    n  = f()[0]
    sumd = get_sumd(n)

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

solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

Solution code:
import math

n = int(input())
n_check = n
num = []
for i in range(int(math.log10(n)+1)+1):
    num.append(n % 10)
    n /= 10
    n -= num[i]/10
if n_check%int(sum(num)) == 0:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Submission status: Accepted

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

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int):
    tmp = 0
    n = N
    while n > 0:
        tmp += n % 10
        n //= 10
    if N % tmp == 0:
        ret = YES
    else:
        ret = NO
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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