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:
def ds(n):
    tmp_n = n
    dsum = 0
    while tmp_n > 0:
        dsum = dsum + tmp_n%10
        tmp_n = tmp_n // 10
    return dsum

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
n = int(x)
s = 0
for elem in x:
  s += int(elem)
if n % s == 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:
#N=list(map(int,input().split()))
N=input()
#M=list(map(int,input().split()))
sum=0
for i in range(len(N)):
  sum=sum+int(N[i])

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

Submission status: Accepted

Solution code:
def num(n):
  rec=0
  while n>0:
    rec+=n%10
    n=n//10
  return rec
n=int(input())
if n%num(n)==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
n=stdin.readline().rstrip()
print('Yes' if int(n)%sum([int(i) for i in n])==0 else 'No')

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

Submission status: Accepted

Solution code:
n = input()

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

if int(n) % nsum == 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:
s=input();print('YNeos'[int(s)%sum(map(int,s))>0::2])

Submission status: Accepted

Solution code:
s=input()
print('YNeos'[(int(s)%sum(map(int,s))!=0)::2])

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:
N=input()
n=[int(c) for c in N]
s=sum(n)
if int(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])
N=int(''.join(n))
if N%s==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 = n // 10
if N % t == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    N = int(input())
    if N % digit_sum(N) == 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n = input()

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

if int(n) % m == 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:
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:
def solve(string):
    return "Yes" if int(string) % sum(map(int, string)) == 0 else "No"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

def S(n):
    if n % 10 == n:
        return n
    return n % 10 + S(n // 10)

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

Submission status: Accepted

Solution code:
n = int(input())

s_n = str(n)

l = len(s_n)
c = 0

for i in range(l):
	c += int(s_n[i])
    
if n % c == 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
N = input()
N0 = list(N)
S_N = 0
N = int(N)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
#ABC101 B
#nを10進数で表したときの各桁の和をS(n)とする
#整数NがS(N)で割り切れるかどうか判定せよ
'''

N = int(input())
Nstr = str(N)
SN = 0
for i in range(len(Nstr)):
	SN += int(Nstr[i])

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('YNeos'[int(N)%S!=0::2])

Submission status: Accepted

Solution code:
def digit_sums(N: int) -> bool:
    s = 0
    temp = N
    while temp > 0:
        s += temp % 10
        temp //= 10
    return N % s == 0


if __name__ == "__main__":
    N = int(input())
    yes = digit_sums(N)
    print('Yes' if yes else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
S = list(input())
print(['No', 'Yes'][int(''.join(S)) % sum([int(s) for s in S]) == 0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# /user/bin/python
# -*- coding: utf-8 -*-
import sys 


def solve(n):
  Sn = str(n)
  div = 0
  for c in Sn:
    div += int(c)

  if n%div == 0:
    return True
  else:
    return False

N = int(input())
if solve(N):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
M=N
Sn=0
 
while M:
  Sn+=M%10
  M=M//10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)

N = input()
di = 0
for c in N:
    di += int(c)
if int(N) % di == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=input();print('YNeos'[int(N)%sum([int(i) for i in N])>0::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
n=int(input())
s=str(n)
c=0
for i in range(len(s)):
    c+=int(s[i])
print("YNeos"[n%c!=0::2])

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc101/tasks/abc101_b
n = int(input())
print("Yes") if n % sum([int(x) for x in list(str(n))]) == 0 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()
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()
a=0
for i in n:
  a+=int(i)
print("Yes") if int(n)%a==0 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()
sn=0
for i in n:
    sn += int(i)
n = int(n)
if n%sn==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
a = []
sum = 0
for i in s:
    a.append(i)
a_int = [int(t) for t in a]
s_int = int(s)
for j in a_int:
    sum += j
if s_int % sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
tmp = 0
for i in range(len(n)):
  tmp += int(n[i])
if int(n) % tmp == 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:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  S = str(N)
  div = 0
  for c in S:
    div += int(c)
  if N % div == 0:
    print('Yes')
  else:
    print('No')


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
N = input()
NN = int(N)
N = list(N)
N = [int(x) for x in N]
S = sum(N)

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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

N = int(input())
SN = sum(int(x) for x in str(N))
if N % SN:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc101/tasks/abc101_b

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main() -> None:
    N = int(input())
    total = sum(list(map(int,list(i for i in str(N)))))
    if N % total == 0:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
num = int(n)
len = len(n)
sn = 0

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

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

Submission status: Accepted

Solution code:
n = int(input())

sum = 0
for i in str(n):
    sum += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

print('Yes' if int(N) % sum(int(d) for d in N) == 0 else 'No')

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B
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:
def S(n):
    ret = 0

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

    return ret


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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(0,10):
    if ntmp>=10**i:
        s+=int((ntmp%10**(i+1))/10**i)
        ntmp-=ntmp%10**(i+1)
    else:
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
class Solver(object):
    def __init__(self):
        self.n = int(input())

    def solve(self):
        digit_sum = sum((int(x) for x in str(self.n)))
        if self.n % digit_sum == 0:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    s = Solver()
    s.solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
n =list(str(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:
s = input()
n = int(s)
t = 0
for i in range(len(s)):
    t += int(s[i])

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 12 15:50:41 2019

@author: shinjisu
"""


import math


def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def dmp(x):
    global debug
    if debug:
        print(x)


# ABC 100 B Ringo's Favorite Numbers
def abc100b():
    D, N = getIntList()
    if N % 100 == 0:
        return (N+1) * 100**D  # WA N==100のとき正しくない 101*100**D
    else:
        return N * 100**D


# ABC 101 B digit sum
def abc101b():
    N = getInt()
    sm = 0
    n = N
    while n > 0:
        sm += n % 10
        n //= 10
    if N % sm == 0:
        return 'Yes'
    else:
        return 'No'


debug = False  # True False
print(abc101b())

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
string = list(str(n))
divide = 0

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

Submission status: Accepted

Solution code:
N = int(input())

S,N2 = 0,N
while N2 >= 1:
    S += N2%10
    N2 //= 10

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

Solution code:
def S(n):
    n = str(n)
    n = list(map(int, n))
    return sum(n)
N = int(input())
S = S(N)
if 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_str = input()
N = int(N_str)

digit_sum = 0
for i in range(len(N_str)):
    digit_sum += int(N_str[i])

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

Submission status: Accepted

Solution code:
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub, itemgetter
import numpy as np

sys.setrecursionlimit(10000)

def read_int():
	return int(sys.stdin.readline().strip())

def read_int_n():
	return [int(x) for x in sys.stdin.readline().strip().split()]

def read_float():
	return float(sys.stdin.readline().strip())

def read_float_n():
	return [float(x) for x in sys.stdin.readline().strip().split()]

def read_str():
	return sys.stdin.readline().strip()

def read_str_n():
	return [str(x) for x in sys.stdin.readline().strip().split()]

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time
	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

@mt
def slv(N):
	S = 0
	for i in N:
		S += int(i)
		
	if int(N) % S == 0:
		ans = 'Yes'
	else:
		ans = 'No'
		
	return ans

def main():
	N = read_str()
	print(slv(N))

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
N = input()

def num(n):
  s = list(n)
  return list(map(int,s))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
nn=n
l=len(str(n))
k=0
for i in range(n):
    k+=n%10
    n=n//10
    if(n == 0):
        break
print(['No','Yes'][nn%k==0])

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())|	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import collections
def inpl(): return list(map(int, input().split()))

#### START
N = input()

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

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

Submission status: Accepted

Solution code:
n = list(map(str,input()))
a = 0
for i in range(len(n)):
    a += int(n[i])
b = len(n)-1
c = 0
for i in range(len(n)):
    c += int(n[i]) * (10 ** b)
    b -= 1
if c % a == 0:
    print("Yes")
else :
    print("No")

Submission status: Accepted

Solution code:
a=input()
m=map(int,list(a))
n=int(a)
if n%sum(m)==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:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    S = lines.pop(0)
    N = int(S)
    digit_sum = 0
    for i in S:
        digit_sum += int(i)
    if N % digit_sum == 0:
        print('Yes')
    else:
        print('No')


#
# main
#

# 1. use list instead of stdin

# contents = '''\
# 999999999\
# '''
# lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
N = input()
num = int(N)
keta = []
for _ in range(len(N)):
  keta.append(num%10)
  num = num//10
if int(N)%sum(keta) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

while(N != 0):
  sum += N % 10
  N = N //10

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

Submission status: Accepted

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

Submission status: Accepted

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

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


def main2():
    n = int(input())
    total = 0
    tmp = n
    while tmp > 0:
        total += (tmp % 10)
        tmp = tmp // 10

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


if __name__ == '__main__':
    main2()

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
""" AtCoder """

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

Submission status: Accepted

Solution code:

n = int( input() )


sn = sum( [int(i) for i in str(n) ] )

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

def main():
    s = input()
    N = int(s)
    S = 0
    for c in s:
        S += int(c)


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
intn = int(n)
S = list(n)

if intn % sum(map(int, 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(["No","Yes"][n%s == 0])

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

print(["No","Yes"][n%s == 0])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
i=input()

sn=0

for j in range(len(i)):
  sn=sn+int(i[j])
  
#print(str(sn))

print(["Yes","No"][int(i)%sn!=0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
ct = 0
for i in range (len(n)):
  ct += int(n[i])
if int(n) %ct == 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 = int(input())
numerator = N
denominator = 0
while N is not 0:
	denominator += N % 10
	N //= 10
if numerator % denominator == 0: print('Yes')
else: print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
M = N
S = 0
while N != 0:
    S += N % 10
    N = N // 10
if M % S == 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();a=list(map(int,N));print('YNeos'[int(N)%sum(a)!=0::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = int(input())
s_hold = s
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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