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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
ans = 0
for i in n:
    ans += int(i)
check = str(int(n) / ans)

if check[-1] == '0':
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input(): return sys.stdin.readline().rstrip()


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
num=input()
num1=num
j=0
while int(num)>0:
  j+=int(num)%10
  num = int(num)/10
if int(num1)%j==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
n_=n
sn=0
while n_!=0:
    sn+=n_%10
    n_=n_//10
if n%sn==0:
    print('Yes') 
else:
    print('No')

Submission status: Accepted

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


sn=0

for i in range(l):
    sn += int(nl[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
l = len(n)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
def digitSum(n):
    # 数値を文字列に変換
    s = str(n)
    # １文字ずつ数値化し配列にする。
    array = list(map(int, s))
    # 合計値を返す
    return sum(array)
if n % digitSum(n) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
Nlist=list(map(str,input()))
a=0
for i in range(len(Nlist)):
    a+=int(Nlist[i])
N=int(''.join(Nlist))
if N%a==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nlist = list(map(int,input()))
rev_n = list(reversed(nlist))
sn = sum(nlist)
n = 0

for i in range(len(nlist)):
    n += rev_n[i]*(10**i) 
if n%sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()

sn = 0
for i in n:
    tmp = int(i)
    s = tmp%10
    sn += s

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
def su(n):
  return sum(list(map(int,list(str(n)))))
N=int(input())
if N%su(N)==0:
  print("Yes")
else:
  print("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:
N = input()
num = int(N)
Nls = list(N)
sum1 = sum([int(i) for i in Nls])
if num%sum1 == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    Sn = sum(list(map(int, list(str(n)))))
    print('Yes' if n % Sn == 0 else 'No')


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def s(n):
    return sum(map(int, list(str(n))))


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

n = input()

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

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

Submission status: Accepted

Solution code:
N = input()

s = 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

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    SN = sum(map(int, str(N)))

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
_N = str(N)
count = 0
for i in _N:
    count +=int(i)

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

Submission status: Accepted

Solution code:
N = input()

S = sum(map(int, N))

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

Submission status: Accepted

Solution code:
x = input()
s = sum(map(int, x))
n = int(x)
print('Yes' if n % s == 0 else '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:
S=input()
print('YNeos'[int(S)%sum(map(int,S))!=0::2])

Submission status: Accepted

Solution code:
n = input()
cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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')
main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    SN = 0
    for n in str(N):
        SN += int(n)
    if N%SN==0:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

SN = sum(map(int, S))

if int(S) % SN == 0:
    print('Yes')

else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def find(n):
    k=str(n)
    ans=0
    for i in k:
        ans+=int(i)
    return ans

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
YES = "Yes"
NO = "No" 

N = int(input())

def S(n):
    S = str(n)
    ret = 0
    for i in range(len(S)):
        ret += int(S[i])
    return ret

if N % S(N) == 0:
    print(YES)
else:
    print(NO)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

N = I()
print('Yes' if N % sum(int(i) for i in list(str(N))) == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

n = int(s)

arrays = []

y = n

while y > 0:
    arrays.append(y % 10)
    y = int(y / 10)

sum_num = 0

for i in range(len(arrays)):
    sum_num += arrays[i]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
N = input()
nl = []

for i in N:
    nl.append(i)
#print(nl)
nl_i = [int(i)for i in nl]
#print(nl_i)

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

Submission status: Accepted

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

sn=sn+n

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

Submission status: Accepted

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

s = 0

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

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

Submission status: Accepted

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

# B - Digit Sums /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# 整数 nに対して，n を十進法で表したときの各桁の和を S(n) で表すことにします． たとえば，S(101)=1+0+1=2です．

# 整数 Nが与えられたとき，N が S(N)で割り切れるかどうかを判定してください．

# 制約
#     1≤N≤109

# 入力
# 入力は以下の形式で標準入力から与えられる．
# N

# 出力
# Nが S(N)で割り切れるなら Yes を，割り切れないなら No を出力せよ．

# 入力例 1
# 12

# 出力例 1
# Yes

# この入力では N=12です． S(12)=1+2=3 なので，N は S(N)で割り切れます．

# 入力例 2
# 101

# 出力例 2
# No

# S(101)=1+0+1=2なので，N は S(N)で割り切れません．

# 入力例 3
# 999999999

# 出力例 3
# Yes


def calculation(lines):
    line = lines[0]
    n = 0
    for i in range(len(line)):
        n += int(line[i])
    if int(line) % n == 0:
        result = 'Yes'
    else:
        result = 'No'
    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['12']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['101']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['999999999']
        lines_export = ['Yes']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
N = int(input())
n = N
flag = True
S = 0
a = 0
while flag:
  a = n % 10
  S +=a
  n = (n -a) //10
  if n == 0:
    flag =False
if N % S == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
# print(N)

X = N
shou = 0
amari = 0
keta_sum = 0

while X != 0:
    shou = X // 10
    amari = X % 10
    # print(shou)
    # print(amari)
    keta_sum = keta_sum + amari
    X = shou

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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("Yes" if int(N)%sum(int(_) for _ in N)==0 else "No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = readline().decode().rstrip()
s = sum([int(x) for x in n])
bl = int(n) % s == 0
print('Yes' if bl else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def s(n):
    ret = 0
    n2 = str(n)
    for i in n2:
        ret += int(i)
    return ret

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

Submission status: Accepted

Solution code:
def main():
    s=input()
    sn=0
    for i in s:
        sn += int(i)
    print("Yes" if int(s)%sn==0 else "No")
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(input())
SN  = sum(int(X) for X in N)
Num = int(''.join(N))
if Num%SN==0: print('Yes')
else: print('No')

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 = int(input())
S = list(str(N))
ans = 0
for i in S:
    ans += int(i)
if (N/ans).is_integer():
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = str(input())

sn = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def main():
  n = int(input())
  nx=n
  sn=0
  while nx>0:
    sn+=nx%10
    nx=int(nx/10)
  if n%sn==0:
    print("Yes")
  else:
    print("No")
main()

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    n = N
    S = 0
    while n > 0:
        S += n % 10
        n //= 10
    if N % S == 0:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# 整数の入力
n = int(input())
temp = n
s = 0
while(temp != 0):
    s += temp%10
    temp //= 10
if n % s == 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])
print(["Yes","No"][min(int(n)%a,1)])

Submission status: Accepted

Solution code:
n = input()
li_n = [int(s) for s in list(n)]
if int(n) % sum(li_n) == 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")

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
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:
s=input()
n=len(s)
sn=0
for i in range(n):
    sn+=int(s[i])
if int(s)%sn==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()
array_N = [int(I) for I in list(N)]
N = int(N)

print('Yes') if N % sum(array_N) == 0 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_str = input()
n = int(n_str)


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

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

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    n = list(input())
    sushi = 0
    for i in n:
        sushi += int(i)
    if int("".join(n)) % sushi == 0:
        print("Yes")
    else:
        print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N = ini()


def solve():
    n = N
    d = 0
    while n:
        d += n % 10
        n //= 10
    return N % d == 0


print("Yes" if solve() else "No")

Submission status: Accepted

Solution code:
N = input().strip()
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 = input()
k = list(map(int, list(n)))
s = sum(k)
n = int(n)
if n%s:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Digit Sums

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

Submission status: Accepted

Solution code:
def s(n):
    ret=0
    while n>0:
        q,r=divmod(n,10)
        ret+=r
        n=q
    return ret
N=int(input())
ans="Yes" if N % s(N) == 0 else "No"
print(ans)

Submission status: Accepted

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

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

count = 0
for i in n:
  x = int(i)
  count = count + x

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
m=n
sum_digit=0
while m>0:
  sum_digit+=m%10
  m=m//10
print("Yes" if n%sum_digit==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:
# coding: utf-8
# Your code here!
N = int(input())
N2 = N
sum = 0
while True:
    sum += N % 10
    N = N // 10
    if N == 0:
        break
if N2 % sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

Solution code:
N = input()

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

while True:
  if n2 == 0:
    break
  s += n2 % 10
  n2 = n2 // 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = s_input()

    count = 0

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

    print('Yes' if int(n)%count==0 else 'No')
 
if __name__ == '__main__':
    main()