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:
number = int(input())
str_number = list(map(int,str(number)))
sum_number = sum(str_number)

if number%sum_number == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


def main():
    """Function."""
    n = str(input())

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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


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

Submission status: Accepted

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

N = int(input())
SumN = digitsum(N)
if N % SumN == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=input()

Sum_N=sum(list(map(int,list(N))))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = len(a)
c = int(a)
sub = 0
for i in range(b):
    sub += int(a[i])

if c%sub ==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
b=N
a=0
while(N>0):
  a+=N%10
  N//=10
if b%a==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions
def j(a):
    if a==1: print("Yes")
    else :print("No")


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#x = int(input())                              #入力整数1つ
#x,y = (int(i) for i in input().split())      #入力整数横2つ
#x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#a,b,c,k = (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
x = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
sum = 0
for i in range(len(x)):
    sum += int(x[i])
j(int(x)%sum==0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = str(input())
L = []
for i in range(len(S)):
  L.append(int(S[i]))
M = sum(L)
if int(S) % M == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
m = n
import math
size = int(math.log10(n) + 1)
#print(size)

ls = []
for i in range(size-1, -1, -1):
  r = int(n//(10**i))
  n = n - r*10**i
  ls.append(r)
  
#print(sum(ls), m%sum(ls))
#print(type(n), type(sum(ls)))
if m%sum(ls) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
Nb = N
SN = 0
for i in range(10):
    SN += N // (10 ** (9 - i))
    N = N % (10 ** (9 - i))
if Nb % SN == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
# N,M = [int(n) for n in input().split()]
# S = str(input())
# T = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list = [i for i in str(N)]
sum = 0

for i in range(len(list)):
    sum += int(list[i])

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

Submission status: Accepted

Solution code:
def sum_degit(n):
    length = len(n)
    n = int(n)
    s_degit = 0
    for _ in range(length):
        s_degit+=n%10
        n = int(n/10)
    return s_degit

N = input()
sum_degit = sum_degit(N)
int_N = int(N)
if int_N%sum_degit == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
li = list(str(N))

Sn = 0
for s in li :
	Sn += int(s)

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

Submission status: Accepted

Solution code:
N = int(input())

S_N = 0
current_N = N
while current_N > 0:
    S_N += current_N % 10
    current_N //= 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = list(map(int,list(a)))

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
sn = [int(e) for e in list(n)]
n = int(n)

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

Submission status: Accepted

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

n1=int(input())
n=n1
b=0
while n>0:
    a=n%10
    n=n//10
    b+=a
#print(b)
if n1%b==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#整数を入力
n = input()

#各桁の和を計算
digits = list(n)
sn = sum(list(map(int, digits)))

#出力
print("Yes" if int(n) % sn == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n= input()
t = list(n)
t = [int(i) for i in t]
s = 0
for j in t:
  s += j

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

Submission status: Accepted

Solution code:
def S(n):
	return sum(map(int, list(str(n))))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def main() -> None:
    n = next_int()
    print(("No", "Yes")[n % s(n) == 0])


def s(n: int) -> int:
    result = 0
    while n != 0:
        result += n % 10
        n //= 10
    return result


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
n0=n
s=0
while n0>0:
  s+=(n0%10)
  n0//=10
if 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 math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

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

def num():
	return map(int , input().split())

def nu():
	return int(input())

def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x

n=nu()
z=n # Copying N to form the sum of digits
s=0 # Store the sum of digits
while(n!=0):
	s+=n%10
	n=n//10
if(z%s==0):
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Digit Sums
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:

a=input()
l=[int(x) for x in a]
if int(a)%sum(l)==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())
if N % sum([int(_) for _ in list(str(N))]) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n =int(input())

s=eval("+".join(str(n)))
if n % s ==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
s = input()
n = int(s)
l = list(s)
sn=0
for i in range(0,len(l)):
  sn=sn+int(l[i])


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
counter=0
counter += N.count('1')*1
counter += N.count('2')*2
counter += N.count('3')*3
counter += N.count('4')*4
counter += N.count('5')*5
counter += N.count('6')*6
counter += N.count('7')*7
counter += N.count('8')*8
counter += N.count('9')*9

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

def digit_sum(num:int, base:int) -> int:

    if num < base:
        return num
    else:
        return digit_sum(int(num/base), base) + (num % base)
    

n = ni()

if n % digit_sum(n,10) == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
num = int(input())
num2 = num
tmp = 0
while num:
    tmp = sum((tmp, num%10))
    num //= 10
if num2%tmp == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = list(input())
N = int(''.join(n))

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

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

Submission status: Accepted

Solution code:
N = input()
Nrisuto = list(N)
int_Nrisuto = list(map(int, Nrisuto))
N_sum = sum(int_Nrisuto)

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

Submission status: Accepted

Solution code:
import math

a=0

N=int(input())
M = int (math.log10(N) + 1)

l = [int(x) for x in list(str(N))]

for i in range(M):
    a += l[i]
print('Yes' if N % a == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = 0

nn = n

while nn != 0:
    s += nn % 10
    nn = nn // 10

#print(s)

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

else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
s = input()

hoge = sum(list(int(x) for x in list(s)))
fuga = int(s)

if fuga % hoge == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=str(n)
array=list(map(int,list(a)))
b=sum(array)

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

Submission status: Accepted

Solution code:
n0 = input()
n = int(n0)
a = list(n0)

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

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

Submission status: Accepted

Solution code:
n = input()
N = int(n)
num = [int(i) for i in n]

if N % sum(num):
    print('No')
else:
    print('Yes')

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

Submission status: Accepted

Solution code:
n=int(input())
print(n % sum(map(int, str(n))) and 'No' or 'Yes')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    N_temp = N
    dsum = 0
    while N >= 1:
        dsum += N % 10
        N = N // 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# encoding: utf-8
N = int(input())

digits = []

N_tmp = N
while N_tmp > 0:
    digits.append(N_tmp % 10)
    N_tmp = N_tmp // 10

SN = sum(digits)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num_s = input()
num = int(num_s)

sum_num = 0
for char in num_s:
    sum_num += int(char)

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

Submission status: Accepted

Solution code:
n = input()
splited_n = [int(i) for i in list(n)]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - Digit Sums
https://beta.atcoder.jp/contests/abc101/tasks/abc101_b

"""
import sys
from sys import stdin
input = stdin.readline


def solve(N):
    digit_sum = sum([int(d) for d in str(N)])
    return 'Yes' if N % digit_sum == 0 else 'No'


def main(args):
    N = int(input())
    ans = solve(N)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

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

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

S = digitSum(N)

if N % S == 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 = int(input())
def S(n):
  l_str = list(str(n))
  l_int = [int(i) for i in l_str]
  return sum(l_int)
if N % S(N) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
list1 = list(str(n))
sn=0
for l in list1:
    sn+=int(l)

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

Submission status: Accepted

Solution code:
n_str = input()
n_int = int(n_str)
digit_sum = sum([int(digit) for digit in list(n_str)])
if n_int % digit_sum == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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:
#!/usr/bin/env python3
N = input()
S = sum([int(c) for c in N])
print(('No', 'Yes')[int(N) % S == 0])

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N=int(input())
sum=0
tmp=N
while tmp!=0:
    sum=sum+tmp%10
    tmp=tmp//10
ans='No'
if N%sum==0:
    ans='Yes'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

n = int(raw_input())
nc = n

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

if nc%s == 0: print "Yes"
else: print "No"

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
from collections import Counter
N = str(input())
#各桁の和を計算するためリストに各桁を格納
str_integer = list(N)
#総和の初期値を0に設定
total_num = 0
for i in str_integer:
  total_num += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    tmp = n
    sum = 0
    while n:
        sum += n % 10
        n //= 10
    if tmp % sum == 0:
        print("Yes")
    else:
        print("No")

solve()

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

if N % goukei == 0: ans = 'Yes'
else: ans = 'No'

print(ans)

Submission status: Accepted

Solution code:
a = list(map(int, input()))
#print(a)
b=sum(a)
#print(b)
c=list(map(str,a))
#print(c)
d="".join(c)
#print(d)
e=int(d)
#print(e)
if e%b==0:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
N = int(input())
Nsum = 0
Nbuf = N
while(Nbuf):
    Nsum += Nbuf % 10
    Nbuf //= 10
if(N % Nsum == 0):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

M= [int(x) for x in list(str(N))]
L = list(map(int, M))

S=sum(L)

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

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000)
Yes,No = 'Yes','No'

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())


# data の桁数を取得する
data_size = int (math.log10(N) + 1)
# data_size
sum = N%10
# sum
m = N%10
# m
for i in range(2,data_size+1):
    # print(sum,m)
    sum += int((N%(10**i)-m)/(10**(i-1)))
    m = N%(10**i)
# print(sum)

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
n = int(input())

s = 0

for i in range(10):
    s += int(n/10**i) %10

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

Submission status: Accepted

Solution code:
# coding: utf-8


def getDigit(N):
    sList = str(N)
    tSum = 0
    for s in sList:
        tSum += int(s)
    return tSum

def solve(N):
    digit = getDigit(N)
    if N % digit == 0:
        return "Yes"
    else:
        return "No"

if __name__ == "__main__":
    N = int(input())
    print(solve(N))

Submission status: Accepted

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

Submission status: Accepted

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