Problem:


Score : 200 points

Problem Statement

Let S(n) denote the sum of the digits in the decimal notation of n.
For example, S(101) = 1 + 0 + 1 = 2.

Given an integer N, determine if S(N) divides N.

Constraints

1 \leq N \leq 10^9

Input

Input is given from Standard Input in the following format:

N

Output

If S(N) divides N, print Yes; if it does not, print No.

Sample Input 1

12

Sample Output 1

Yes

In this input, N=12.
As S(12) = 1 + 2 = 3, S(N) divides N.

Sample Input 2

101

Sample Output 2

No

As S(101) = 1 + 0 + 1 = 2, S(N) does not divide N.

Sample Input 3

999999999

Sample Output 3

Yes



Sample input:
12


Sample output:
Yes

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()

def S(n):
    if n==0: return 0
    else:
        l = len(str(n))
        s = n//(10**(l-1))
        return s+S(n%(10**(l-1)))
if n%S(n) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
s = list(map(int,list(str(n))))
if n % sum(s) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def Sum(n):
    s = str(n)
    sli = list(map(int , s))

    return sum(sli)

def DigitSums(n):

    digitsum = Sum(n)

    return "Yes" if n % digitsum == 0 else "No"

def main():
    n = int(input())
    print(DigitSums(n))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
numss = list(str(N))
nums = [int(x) for x in numss]

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = input()
sum = 0
for c in n:
  sum += int(c)
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())

tmp = N

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if int(N) % L == 0:
  print('Yes')

else:
  print('No')

Submission status: Accepted

Solution code:

def digit_sum(n):
    ans = 0
    while n > 0:
        ans += n % 10
        n //= 10
    return ans


def solve():
    N = int(input())

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


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
def s(x):
  liststrx=list(str(x))
  ret=0
  for i in liststrx:
    ret+=int(i)  
  return ret

if n%s(n)==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:
def main():
    n = input()
    n_int = int(n)
    n_list = map(int, list(n))
    sn = sum(n_list)

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input())
S=str(N)
sum=0

for num in S:
  sum += int(num)
  
if N%sum==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(map(int,n))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
n = list(input())

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

n = ''.join(n)
nint = int(n)
if nint % mod == 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()
S = sum(int(c) for c in N)
print("No" if int(N) % S else "Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
sN = 0

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

print('Yes') if int(N) % sN == 0 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 = str(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()
A = [N[i] for i in range(len(N))]
B = list(map(int, A))
C = sum(B)
if int(N)%C == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

n = N
S = 0
while n > 0:
    S += n % 10
    n //= 10

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

Submission status: Accepted

Solution code:
n=int(input())
sn=str(n)
ans=0
for i in sn:
  ans+=int(i)
if n%ans==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:
n=int(input())
def S(n):
    res=0
    while(n>0):
        res+=n%10
        n//=10
    return res

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

def S(N):
  if N < 10:
    return N
  return N%10 + S(N//10)

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

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:
#abc101 b
n=input()

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

if int(n)%func(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()
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:
N = input()
s = 0
for i in N:
  s += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B - Digit Sums
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:
s = int(input())

sm = sum([int(c) for c in str(s)])
if s%sm == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Tue Mar 10 14:07:32 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = 0
keta = 10

while n >= 1:
    s += n%10
    n //= keta

if n_origin%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()
l = list(N)
S = 0 

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():

    n=list(input())
    m=int(''.join(n))
    cnt=sum([int(i) for i in n])
    print('Yes' if m%cnt==0 else 'No')


resolve()

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 = 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=input()
'''
L1=map(int,list(N))
print(*L1)  # 12なら 1 2
L2=map(int,str(N))
print(*L2)   #12なら 1 2
'''
print("No" if int(N)%sum(map(int,str(N))) else "Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
L=map(int,list(N))
#print(*L)  -> 12なら 1 2
print("Yes" if int(N)%sum(map(int,list(N)))==0 else "No")

Submission status: Accepted

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

SN = 0
for c in list(S):   
    SN += int(c)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input().strip())
#-----

sum_digit=0
for word in str(N):
  sum_digit += int(word)

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

Submission status: Accepted

Solution code:
#ABC101

n = input()
m = list(map(int,list(str(n))))
s = sum(m)

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

Submission status: Accepted

Solution code:

n=input()
n_=n
l=[]
for i in range(1,len(str(n))+1):
            w_i=int(n)%10
            if int(n)<10:
                        l.append(int(n))
                        break
            l.append(w_i)
            n=int(n)//10
            

s=sum(l)                        

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B
# 2020/03/02 12:44-
n = int(input())
def SumDegit(n):
    ans = 0
    while n > 0:
        ans += n%10
        n = n//10
    return ans

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

Submission status: Accepted

Solution code:
n=int(input())

s = str(n)

wal = 0

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline().rstrip

N = input()
K = map(int, N[::-1])

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
l = []
for i in range(len(n)):
    l.append(n[i])
s = int(n) / sum([int(i) for i in l])
if str(s)[-1] == '0':
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

for j in range(len(m)):
    s += m[j]

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
n1 = int(s)
n2 = sum([int(i)for i in s])


if n1%n2 == 0 :
  print('Yes')
else :
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()

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

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    s=STR()
    sn=0
    for i in s:
        sn+=int(i)
    if int(s)%sn==0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Submission status: Accepted

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

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

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

for i in n:
  s += int(i) #各位の和がsになる

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
s = list(a)
n = 0

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

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

Submission status: Accepted

Solution code:
N = input()
def S(n):
    y = 0
    for i in range(len(n)):
        y += int(n[i])
    return y

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

Submission status: Accepted

Solution code:
N = input() 
N1 = int(N)
n = sum(list(map(int,str(N))))
if N1%n == 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()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import itertools
#n = int(input())
#n, d = list(input().split())
s = input()
point = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#101_B
def S(N):
    return sum([int(n) for n in str(N)])
N=int(input())
print('Yes' if N%S(N)==0 else 'No')

Submission status: Accepted

Solution code:
def s(x):
    y = list(map(int, list(str(x))))
    return sum(y)


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_N = input()
int_N = int(str_N)
str_L = list(str_N)
int_L = [int(i) for i in str_L]
s = sum(int_L)
if int_N % s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())


s = str(n)
b = 0
for i in s:
    b += int(i)
if n%b == 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:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

S=input()
SN=sum(map(int, S))
print("No" if int(S)%SN else "Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=input()

S=0
for i in range(len(A)):
    S+=int(A[i])

N=int(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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


def main():
    number = int(input())
    if not number % get_digit_sum(number):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
i=list(str(n))
c=0
for x in i:
    c+=int(x)
if n%c==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()

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
s = input()
l = [int(i) for i in s]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 5分強.プログラム問題.
n = int(input())
l = list(map(int, list(str((n)))))
s = sum(l)
if n%s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# 5分 くらい.easy.
n = int(input())
l = list(map(int, list(str((n)))))
#print(l)
s = sum(l)
#print(s)
if n%s == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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