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 = int(input())
s = str(n)
x = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
n1 = str(n)
n2 = list(n1)
n3 = [] 
for i in n2:
    n3.append(int(i))
nsum =sum(n3)
if(n %nsum == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def actual(N):
    S_n = sum([int(x) for x in str(N)])

    if N % S_n == 0:
        return 'Yes'

    return 'No'

N = int(input())
print(actual(N))

Submission status: Accepted

Solution code:
n = input()
l = [int(char) for char in n]

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10**9)
mod = 10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

t = n
s  = 0

while t > 0:
    s += t % 10
    t //= 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
s_n = 0

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

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

Submission status: Accepted

Solution code:
n=int(input())
#a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
nst=list(str(n))
total=0
for ni in nst:
    total+=int(ni)
if n%total ==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def keisan(x):
  ret_val=0
  while x>0:
    ret_val+=x%10
    x//=10
  return ret_val

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
    N = input()
    sn = sum(int(i) for i in N)
    if int(N)%sn == 0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

Submission status: Accepted

Solution code:
n = input()
aa = int(n)
n = list(n)
ans = 0
for i in n:
	k = int(i)
	ans += k

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input();print("YNeos"[int(a)%sum(int(x)for x in a)>0::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

print("Yes" if int(N) % added == 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:
# input
N = int(input())

# check
Sn = sum([int(n) for n in str(N)])

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(len(n)):
  a += int(n[i])
  
n = ''.join(n)
n = int(n)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def S(N):
  r = list(N)
  p = sum(map(int, r))
  return p

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
n = int(N)
s = list(N)
for i in range(len(s)):
  s[i] = int(s[i])
  
if n % sum(s) == 0:
  print("Yes")
else:
  print("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:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    n = input()
    num = 0
    for i in n:
        num += int(i)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

S = sum(map(int, 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])
if int(n) % s == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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



if __name__ == '__main__':

    ABC_101_B()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
S = sum(int(x) for x in str(N))
bl = N%S == 0
print('Yes' if bl else 'No')

Submission status: Accepted

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

if int(''.join(N))%sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
n = input().strip()
s = reduce(lambda x,y:x+y, map(int, list(n)))
ni = int(n)
if ni % s > 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
Sn=0
for i in range(1, 10):
	if i > len(S):break
	Sn += int(S[-i])
ans = "No"
if Sn == 0 or int(S) % Sn == 0:ans = "Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
Sn=0
for i in range(1, 10):
	if i > len(S):break
	Sn+=int(S[-i])
ans = "No"
if Sn == 0 or int(S) % Sn == 0:ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
n = int(raw_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:
s=input()
print('Yes' if int(s)%sum(list(map(int,s)))==0 else '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:
s=input()
ans=0
for i in s:
    ans+=int(i)
if int(s)%ans==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:
S = int(input())
Slist = list(str(S))
res = 0
for i in Slist:
  res += int(i)
if S % res == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
n_list = list(str(n))
sum_n = 0
for i in n_list:
    sum_n += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = input()
sum = 0
temp = int(n)
for i in range(len(n)):
    sum += int(temp) % 10
    temp /= 10

if int(n) % sum == 0:
    print('Yes')
    exit(0)

print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = input()
s = 0
for i in n:
    s += int(i)
print("Yes") if int(n) % s == 0 else print("No")

Submission status: Accepted

Solution code:
n=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:
def read_int():
    return input()

def main():
    N = read_int()
    print('Yes' if int(N) % sum([int(s) for s in list(N)]) == 0 else 'No')
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=input()
L=[int(n) for n in list(n)]
print("YNeos"[int(n)%sum(L)!=0::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N =int(input())

N1 =str(N)
x1=0
for i in range(len(N1)):
    x = int(N1[i])
    x1 = x1 + x
#print(x1)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

ans = 0
for i in n:
    ans += int(i)

print('Yes' if int(n) % ans == 0 else '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:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def query(n):
    ans = 0
    for c in str(n):
        val = ord(c) - ord('0')
        ans += val
    return ans

def main():
    n = int(input())
    if n % query(n) == 0:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

str_n = str(n)
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s_n = 0
for ch in s:
    s_n += int(ch)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
raw_n = input()
N = int(raw_n)
SN = sum(map(int, raw_n))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fileinput

n = int(input())
nn = list(map(int, str(n)))

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    S = sum(int(s) for s in str(N))
    if N % S == 0:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

N_list = [int(N[i]) for i in range(len(N))]

if int(N) % sum(N_list) == 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()

S_int = int(S)
S_2 = sum(map(int, list(S)))

if S_int % S_2 == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

w = str(n)
length = len(w)
sm = 0

for a in range(0, length):
    sm += int(w[a])

if n % sm == 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=input()
cnt=0
for s in n:
    cnt+=int(s)
if int(n)%cnt==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()
summ = 0

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

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

Submission status: Accepted

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

import sys
# import math
# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = input()
    s_n = 0
    for char in n:
        s_n += int(char)
    print('Yes') if int(n) % s_n == 0 else print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def sn(x):
    count = 0
    for i in range(len(x)):
        count += int(x[i])
    return count

n = int(input())
if n % sn(str(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:
from functools import reduce

n = input()
sn = reduce(lambda x, y: int(x) + int(y), n)
r = 'Yes' if (int(n) % sn) == 0 else 'No'
print(r)

Submission status: Accepted

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

if int(n)%sum_n == 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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


s=input().rstrip()
u=list(map(int,s))
k=sum(u)
if int(s)%k==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()
n = int(N)
count1 = sum(int(x) for x in N)
if n % count1 ==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# ABC101B

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

Submission status: Accepted

Solution code:
n = list(input())
n_n = int("".join(n))
s=0
for i in n:
    s+=int(i)

if n_n%s == 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 == int(n)/Sn:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc101


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

    n_sum = 0
    for n in str(N):
        n_sum += int(n)
    
    if N % n_sum == 0:
        return "Yes"
    else:
        return "No"


print(main())

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    N=input()
    SN=0
    for x in N:
        SN+=int(x)
    YesNo(not int(N)%SN)
    

if __name__ == '__main__':
    main()

Submission status: Accepted

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