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

Submission status: Accepted

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

    return "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
    print(solve(N))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def sumEach(n):
    n = str(n)
    return sum(map(int, n))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
sum_n = 0

for i in n:
    sum_n += int(i)

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
n=int(input())
buf = [int(x) for x in list(str(n))]

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

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:
n = input()
print(("No","Yes")[int(n) % sum(map(int, list(n))) == 0])

Submission status: Accepted

Solution code:
n = input()
print(int(n) % sum(map(int, list(n))) == 0 and "Yes" \
      or "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

S = str(N)
s = 0
for i in range(len(S)):
    s += int(S[len(S)-1-i])

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

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()
sn=sum(list(map(int,[_ for _ in n])))
if int(n)%sn==0:
  result='Yes'
else:
  result='No'
print(result)

Submission status: Accepted

Solution code:
import sys
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()
SN=0
for i in range(len(N)):
    SN=SN+int(N[i])
N=int(N)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
n = int(input())
n0 = n
digits = len(str(n))
s = 0

for ii in range(digits)[::-1]:
  s += int(n/10**ii)
  n -= int(n/10**ii) * 10**ii
  
if n0 % s == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = input()
s = sum([int(n[i]) for i in range(len(n))])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
NList=list(N)


N=int(N)

SN=0
for i in range(len(NList)):
    SN+=int(NList[i])


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

Submission status: Accepted

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

while cnt>0:
  sum+=cnt%10
  cnt//=10
  
if n%sum==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = readline().decode('utf8').rstrip()
S = [int(x) for x in list(N)]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
a=len(str(N))
w=0
for i in str(N):
  w+=int(i)

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
n = str(input())

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

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

Submission status: Accepted

Solution code:
N_str = input()
print('Yes') if int(N_str) % sum(int(x) for x in N_str) == 0 else print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

Sn = sum([int(s) for s in str(N)])

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

Submission status: Accepted

Solution code:
N = input()

d = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=int(input())
T=S
i=0
x=0

while S>10**(i+1):
  i+=1

for a in range(i+1)[::-1]:
  x+=S//(10**a)
  S-=(S//(10**a))*(10**a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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()
sn = sum([int(i) for i in str(N)])
if int(N) % sn == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

while t>0:
  a=t%10
  s=s+a
  t//=10
  
if n%s==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def sum(x):
  y = x;
  sum = 0
  while y > 0:
    sum = sum + (y % 10)
    y = y // 10

  return sum

i = int ( input () )
print( "Yes" if (i % sum(i) == 0) else "No")

Submission status: Accepted

Solution code:
m=int(input())
n=m
tot=0
while(n>0):
    dig=n%10
    tot=tot+dig
    n=n//10
if (m%tot)==0:
    print('Yes')
elif (m%tot)!=0:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n =input()
nn=list(n)
a=0
for i in nn:
    a+=int(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
nl = list(str(n))

wrk = 0
for i in range(len(nl)):
    wrk += int(nl[i])

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

Submission status: Accepted

Solution code:
def wa(N) :
    S = str(N)
    array = list(map(int,S))
    return sum(array)
import sys
input = sys.stdin.readline
N = int(input())
ans = "No"
s = wa(N)
if N % s == 0 :
    ans = "Yes"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

s = 0

for i in range(len(n)):
    s += int(n[i])
    
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])


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:

n = input()
m = list(n)
sum = 0

for i in range(len(m)):
    sum += int(m[i])
#print(sum)

a = int("".join(n))
#print(a)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
N = int(input())

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input();print('YNeos'[1-(int(a)%sum(map(int,a))==0)::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=input()
n=[int(i) for i in N]
print("Yes" if int(N)%sum(n)==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:
import sys

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

def main():
    return 'Yes' if int(n) % sum([int(d) for d in n]) == 0 else 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
n = int(input())
n_l = list(str(n))
m = 0
for i in n_l:
    j = int(i)
    m += j
if n % m != 0:
    print('No')
else:
    print('Yes')

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


def s(n):
    lst = list(str(n))
    for i in range(len(lst)):
        lst[i] = int(lst[i])

    return sum(lst)

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

Submission status: Accepted

Solution code:
n = int(input())
sn = sum(map(int,str(n)))

if n%sn == 0:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ncpy = n
lst = []

while ncpy >= 10:
    lst.append(ncpy%10)
    ncpy //= 10
else:
    lst.append(ncpy)

sn = sum(lst)

if n%sn == 0:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

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

if n%sn == 0:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = list(str(input()))

S = 0
N = 0
for i in range(len(n)):
    S += int(n[i])
    N += int(n[i]) * 10 ** (len(n) - i - 1)
if N % S == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def divide(n):
    if len(str(n)) <= 1:
        return n

    out = n % 10
    
    return out + divide(n//10)

n = int(input())
sn = divide(n)

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

Submission status: Accepted

Solution code:
n = input()
sn = sum(map(int, n))

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
N_str = list(str(N))
a = 0
for i in N_str:
    a += int(i)
if N % a == 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()
S = 0
for i in N:
	S += int(i)
    
if S % int(N) == 0 or int(N) % S == 0:
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = sum([int(i) for i in str(n)])

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

Submission status: Accepted

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

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

def S(N):
        ans = 0
        for i in N:
                ans += i
        return ans

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

Submission status: Accepted

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

Submission status: Accepted

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

n = input()

str_n = list(n)
int_n = int(n)

ns = list(map(int, str_n))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
N_=[int(i) for i in str(N)]
S=sum(N_)
if N%S==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
S = int(N)
n = list(N)
ans = 0

for a in n:
    x = int(a)
    ans += x

if S % ans == 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:
def s(n):
    rtn=0
    while n>0:
        rtn += n%10
        n//=10
    return rtn
x=int(input())
print('Yes' if x%s(x)==0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
i = input()
a = i.split()
a = int(a[0])
b = a
s = 0
for i in range(len(i)):
    s = s + (a % 10)
    a = math.floor(a / 10)

ans = b % s


if (ans == 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:
n=str(input())
N = len(n)
s = 0

for i in range(N):
    s+=int(n[i])
   # print(s)

n = int(n)

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

Submission status: Accepted

Solution code:
N = list(input())
n = 0

S = 0
for i in range(len(N)):
    S = S + int(N[i])
    n = (int(N[i]) * (10 ** (len(N) - i - 1))) + n
    
if n % S == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()

IN = int(N)
LN = list(map(int,N))
S = sum(LN)

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

Submission status: Accepted

Solution code:
a=input()
l=[int(i) for i in a]
k=sum(l)
A=int(a)

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

Submission status: Accepted

Solution code:
def ok():
  print("Yes")
def ng():
  print("No")
  
n=input()
intn=int(n)
listn=list(n)
s=0
for _ in listn:
  s+=int(_)
  
if intn%s==0:
  ok()
else:
  ng()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

S_New_STR = list(S)

S_New_INT = [int(s) for s in S_New_STR]


S_New_SUM = sum(S_New_INT)

S_N = int(S)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
N_n = len(N)

S = 0
for i in range(N_n):
  S += int(N[i])
  
if int(N) % S == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ds = 0

Nc = N

while (Nc >= 10):
    ds += Nc % 10
    Nc = Nc // 10
ds += Nc

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = input()
N_list = list(N)
S = 0

for n in N_list:
    S += int(n)

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

N = int(n)
ls_N = [int(_) for _ in n]

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

Submission status: Accepted

Solution code:
n = int(input())

test = 0

a = n

for i in range(len(str(n))):
	test = test + n % 10
	n = int((n - n%10)/10)
	#print(i,test,n)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
num = 0
for c in N:
    num += int(c)
num = int(N) / num
if num.is_integer():
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
wals = list(str(N))
wals = [int(s) for s in wals]
wa = sum(wals)

if N % wa == 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):
    sum_N = 0
    for i in range(len(str(N))):
        sum_N += int(str(N)[i])
    if N % sum_N == 0:
        print(YES)
    else:
        print(NO)

# Generated by 1.1.6 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:
def examB():
    N = I()
    SN = 0
    for i in str(N):
        SN += int(i)
    if N%SN==0:
        ans = "Yes"
    else:
        ans = "No"
    print(ans)

import sys,copy,bisect,itertools,heapq,math
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()
mod = 10**9 + 7
inf = float('inf')

examB()

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
N_list = list(str(N))
S_n = 0
for i in range(len(N_list)):
	S_n += int(N_list[i])
if N % S_n == 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:
A = input()
B = int(A)
b = 0
for _ in range(len(A)):
  b += B % 10
  B = B//10
if int(A) % b == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
sn = list(str(a))
y=0
 
for i in sn:
    x = int(i)
    y = y +x

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
D = input()
S = sum(map(int, D))
N = int(D)

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
t = 0
for i in range(len(str(N))):
  t += int(str(N)[i])
if N % t: print("No")
else: print("Yes")

Submission status: Accepted

Solution code:
N = str(input())

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

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

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