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:
#!/usr/bin/env python3
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()
a=0
for i in n:
    a+=int(i)

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    nkeep=n
    sn=0
    while n>0:
        sn+=n%10
        n=n//10
    if nkeep%sn==0:
        print('Yes')
    else:
        print('No')
resolve()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
n = input()

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

if int(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 "No")

Submission status: Accepted

Solution code:
n = str(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os
import math
import string
import collections

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def f(N):
    return sum(map(int, str(N)))


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

    N = ii()
    q = f(N)
    print('No' if N%q else 'Yes')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()


def check():
    if int(S)%sum(map(int,list(S)))==0:
        return 'Yes'
    return 'No'
print(check())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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()
a = int(n)
b = eval('+'.join(list(n)))
print('Yes' if a%b==0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

Submission status: Accepted

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

while n > 10:
    _sum += n % 10
    n = n // 10
    
_sum += n

if N % _sum == 0:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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


def solve(N: int):
    sN = sum(int(d) for d in str(N))
    print(YES if N % sN == 0 else NO)


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

Submission status: Accepted

Solution code:
import sys
s = input()
_sum = 0
for x in s:
	_sum += int(x)
print ('Yes' if int(s) % _sum == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
s=0
for i in str(N):
    s += int(i)
print('Yes' if N%s == 0 else '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 = int(input())
li = list(str(n))
li_ = [int(i) for i in li]
allSum = sum(li_)
if not n % allSum: print("Yes")
else: print("No")

Submission status: Accepted

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

L=len(N)

Sn=0
for i in range(L):
  Sn +=int(N[i])
#print(n,Sn)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N0 = input()

N = [int(i) for i in list(N0)]
S = sum(N)
if int(N0) % S:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    n = int(input())
    n_str = str(n)
    s = 0
    for i in range(len(n_str)):
        s += int(n_str[i])

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

Solution code:

n = input()
N = list(n)
n = int(n)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x=int(input())
listp=[]
z=math.log10(x)
z=z+1
rem=0
n=x
for i in range(int(z)):
    n!=0
    rem=n%10
    listp.append(int(rem))
    n=n/10
    

p=sum(listp)
z=int(p)
if (x%z==0):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input();*L,=map(int,N);print('YNeos'[int(N)%sum(L)>0::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()

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

Submission status: Accepted

Solution code:
# ABC 101: B – Digit Sums
n = int(input())
digits = [int(s) for s in list(str(n))]
print('Yes' if n % sum(digits) == 0 else 'No')

Submission status: Accepted

Solution code:
def digitsSum(num):
    cnt=0
    num=str(num)
    l=len(num)
    for i in range(l):
        cnt+=int(num[i])
    return cnt

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

def main():
    N = list(map(int, open(0).read().split()))
    
    N_value = N[0]
    S = sum(list(map(int, str(N_value))))
    if N_value % S == 0:
        print("Yes")
    else:
        print("No")


main()

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

def resolve():
  n = int(input())
  s = str(n)
  sum = 0
  for c in s:
    sum += int(c)
  if n % sum == 0:
    print("Yes")
  else:
    print("No")
  return

if __name__ == "__main__":
  resolve()

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

Submission status: Accepted

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

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:
def examA():
    def calc_L(x1,y1,x2,y2):
        return ((x2-x1)**2 + (y2-y1)**2)**0.5
    N = I()
    X = [LI()for _ in range(N)]
    ans = 0
    for x in itertools.permutations(X):
        cur = 0
        for i in range(1,N):
            cur += calc_L(x[i-1][0],x[i-1][1],x[i][0],x[i][1])
        #print(x,cur)
        ans += cur
    for i in range(1,N+1):
        ans /= i
    print(ans)
    return

def examB():
    def judge(n):
        sn = 0
        for i in n:
            sn += int(i)
        if int(n)%sn==0:
            return "Yes"
        return "No"
    N = SI()
    ans = judge(N)
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**6)

if __name__ == '__main__':
    examB()

"""

"""

Submission status: Accepted

Solution code:
def S(n):
  s=list(str(n))
  m=0
  for i in s:
    m+=int(i)
  return m

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

Submission status: Accepted

Solution code:
a = input()
b = int(a)
s = list(a)
s = list(map(int,s))
d = sum(s)
if b%d == 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:
# AtCoder Beginner Contest 101
# B - Digit Sums
# https://atcoder.jp/contests/abc101/tasks/abc101_b
N = input()
S = sum(list(map(int, N)))
N = int(N)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem B - Digit Sums

# input
N = input()
N_str = list(N)
N_num = int(N)

# initialization
digit_sum = 0

# count
for n in N_str:
    tmp = int(n)
    digit_sum += tmp

# check
if N_num%digit_sum==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

while(s > 0):
    tmp += s % 10
    s = s // 10

if N % tmp:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
r = sum(int(i) for i in str(n))
print('No' if n%r else 'Yes')

Submission status: Accepted

Solution code:
n = input()
a = []
for  x in n:
    a.append(int(x))
p = sum(a)
q = int(n)
if q%p == 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:
n=int(input())
s=str(n)
t=0
for ss in s:
    t+=int(ss)

if n%t==0:
    print('Yes')
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:
n = input()
sl = list(n)
n = int(n)

j = sum([int(s)for s in sl])

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input()
ans_list = []
for i in range(len(a)):
    ans_list.append(int(a[i]))
ans = sum(ans_list)
if int(a) % ans == 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:
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left #bisect_left(list, value)
#from fractions import gcd
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
M = [int(s) for s in N]
L = int(N)
div = sum(M)

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

Submission status: Accepted

Solution code:
a=str(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:
def gerar(N):
	soma = 0
	while (N!=0):
		soma += N % 10
		N = int(N / 10)

	return soma

N=int(input())

aux=gerar(N)

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

Submission status: Accepted

Solution code:
def sum(number):
    sum = 0
    for i in range(len(number)):
        sum+=int(number[i])
    return sum
number = str(input())
ans = "Yes" if int(number)%sum(number) == 0 else "No"
print(ans)

Submission status: Accepted

Solution code:
n = input()

s = sum(int(d) for d in n)
if int(n) % s:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
def soma(n):
    sum = 0;
    while(n!=0):
        sum = sum + int(n%10)
        n = int(n/10)

    return sum

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

Submission status: Accepted

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

while (n > 0):
    resto = n % 10
    n = (n - resto)/10
    soma = soma + resto
soma = int(soma)

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

Submission status: Accepted

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

inp = int(input())

if(inp%sum_digits(inp)==0):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    soma = soma_digitos(n)
    if n % soma == 0:
        print('Yes')
    else:
        print('No')
def soma_digitos(n):
    soma = 0
    while n >= 1:
        soma += n%10
        n = n//10
    return soma
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
k=0
for i in x:
    k+=int(i)

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

Submission status: Accepted

Solution code:
line = input()
num = [int(n) for n in line.split()]
num = num[0]
value = "No"
summation = 0
original_number = num
while num:
    summation += num % 10
    num //= 10
if original_number%summation == 0:
    value = "Yes"
print(value)

Submission status: Accepted

Solution code:
n = int(input())

s = str(n)
total = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numero = input()
soma = 0
for x in range(len(numero)):
    soma = soma + int(numero[x])

if int(numero) % soma == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import io

nancy = str(input())
nsum=0
for i in nancy:
    nsum+=int(i)
print('Yes' if int(nancy)%nsum==0 else 'No')

Submission status: Accepted

Solution code:
SN = list(input())
N = int("".join(SN))
nSN = [int(num) for num in SN]
s = sum(nSN)
if N % s == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())

len = len(str(n))
sn = 0
ni = n

for i in reversed(range(0, len)):
    ans =  ni // (10**i)
    sn = ans + sn
    ni = ni - ans * (10**i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
sn = list(str(n))

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

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

Submission status: Accepted

Solution code:
N = input()
int_N = int(N)
list_N = list(N)

N_sum = 0
for i in list_N:
    N_sum += int(i)

if int_N % N_sum == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

SN=0
while(N2>0):
  SN+=N2%10
  N2//=10
  
#print(SN)
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 = int(input())
s = str(n)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def q2():
    N = [i for i in input()]
    S = 0
    for n in N:
        S += int(n)
    N = int(''.join(N))
    d,m = divmod(N, S)
    if m == 0:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    q2()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3

# input
N = input()


def main():
    s = 0
    for x in N:
        s += int(x)
    if int(N) % s == 0:
        ans = 'Yes'
    else:
        ans = 'No'    
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    s = input()
    a = 0
    b = int(s)
    
    for i in s:
        a += int(i)
        
    if b % a ==0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  n = int(input())
  su_ = 0
  tmp = n
  for _ in range(n):
    su_ += tmp % 10
    tmp //= 10
    if tmp == 0:
      break
  if n % su_ == 0:
    print('Yes')
  else:
    print('No')
    
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input())
i = N
sum = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

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

ans = "No"

if int(n) % num == 0:
    ans = "Yes"

print(ans)