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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()

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

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

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

n=int(input())
a=n%9
if a==0:
    a=9
if n%a==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
sum=0
for i in range(len(s)):
    sum+=int(s[i])
    
print(sum)

Submission status: Wrong Answer

Solution code:
999999999

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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(n%s==0):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
tn = n
s = 0
while tn < 0:
  s += tn % 10
  tn = tn // 10
if s % n == 0:
  print("Yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
N = int(input())

L = len(str(N))
S = sum([N // 10**i for i in range(1, L+1)])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(*[["Yes","No"][(int(s)%sum(int(i)for i in s))&1]for s in[input()]])

Submission status: Wrong Answer

Solution code:
print(*[["Yes","No"][int(s)%sum(int(i)for i in s)&1]for s in[input()]])

Submission status: Wrong Answer

Solution code:
N = input()
SN = sum(map(lambda x: int(x), N.split()))
print('No' if int(N) % SN else 'Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

sn = 0
while n:
    sn += n % 10
    n //= 10

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

Submission status: Wrong Answer

Solution code:
s = input()
a = list(s)[0]
b = list(s)[1]
sn = a + b
sn = int(sn)
s = int(s)

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

Submission status: Wrong Answer

Solution code:
s = input()
a = list(s)[0]
b = list(s)[1]
sn = a + b
sn = int(sn)
s = int(s)

if s % sn == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
len_n = len(n)
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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
numlist=list(N)
numsum=0
for num in numlist:
    numsum+=int(num)
if numsum%int(N)==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ten_count = 0
process_N = 0
process = 0
S = 0
bigger = 0

while True:
    if N < 10:
        break
    if bigger == 0:
        bigger = int(N / 10)
    elif bigger != 0:
        bigger = int(bigger / 10)
    ten_count += 1
    if bigger < 10:
        break

for i in range(ten_count + 1):
    if ten_count == 0:
        break
    if (ten_count - i) >= 1 and process_N == 0:
        process = int(N / (10 ** (ten_count - i)))
        process_N = N - (process * (10 ** (ten_count - i)))
        S += process
    if (ten_count - i) >= 1 and process_N != 0:
        process = int(process_N / (10 ** (ten_count - i)))
        process_N = process_N - (process * (10 ** (ten_count - i)))
        S += process
    if (ten_count - i) < 1:
        S += process_N
        break

if ten_count == 0:
    S = N

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ten_count = 0
process_N = 0
process = 0
S = 0
bigger = 0

while True:
    if bigger == 0:
        bigger = int(N / 10)
    elif bigger != 0:
        bigger = int(bigger / 10)
    ten_count += 1
    if bigger < 10:
        break

for i in range(ten_count + 1):
    if (ten_count - i) >= 1 and process_N == 0:
        process = int(N / (10 ** (ten_count - i)))
        process_N = N - (process * (10 ** (ten_count - i)))
        S += process
    if (ten_count - i) >= 1 and process_N != 0:
        process = int(process_N / (10 ** (ten_count - i)))
        process_N = process_N - (process * (10 ** (ten_count - i)))
        S += process
    if (ten_count - i) < 1:
        S += process_N
        break

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

Submission status: Wrong Answer

Solution code:
def solve (N):
    s=0
    for b in str(N):
        s = s + int(b)
    if N % s ==0:
        return 'Yes'
    else:
        return 'No'

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
    ii=0
    for s in str(n):
        ii += int(s)
    if n%ii==0:
        return "Yes"
    else:
        print(ii)
        return "No"

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = input()
S = sum([int(num) for num in N])
print('yes' if int(N) % S == 0 else 'No')

Submission status: Wrong Answer

Solution code:
S = input()
inputInInt = int(S)
sum = 0
for i,v in enumerate(S):
    sum += int(v)

if inputInInt%sum is 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=int(input())
d=0
while s!=0:
	d+=s%10
	s=s//10
print(["YES","NO"][s%d!=0])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=int(input())
d=0
while s!=0:
	d+=s%10
	s=s//10
print(["YES","NO"][s%d])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

n = N
m = 0
while n:
    n, d = divmod(n, 10)
    m += d

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
while n > 0:
    a.append(n%10)
    n //= 10 
s = 0
for i in range(len(a)):
	s += a[i]
if n%s == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = input()
if N == '0':
    print('yes')
else:
    if N[0] == '-':
        N = str(int(N) * (-1))
    sum = 0
    for i in N:
        sum = sum + int(i)
    r = int(N) % sum
    if r == 0:
        print('yes')
    else:
        print('no')

Submission status: Wrong Answer

Solution code:
N = input()
if N == '0':
    print('yes')
else:
    if N[0] == '-':
        N = int(N) * (-1)
    sum = 0
    for i in N:
        sum = sum + int(i)
    r = int(N) % sum
    if r == 0:
        print('yes')
    else:
        print('no')

Submission status: Wrong Answer

Solution code:
N = input()
if N == '0':
    print('yes')
else:
    sum = 0
    for i in N:
        sum = sum + int(i)
    r = int(N) % sum
    if r == 0:
        print('yes')
    else:
        print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
N = input()
if N == '0':
    print('yes')
sum = 0
for i in N:
    sum = sum + int(i)
r = int(N) % sum
if r == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
s = input()
s2 = list(s)

s3 = list(map(int, list(s2)))

s4 = sum(s3)
s = int()



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

Submission status: Wrong Answer

Solution code:
N = input()
if N == 0:
    print('yes')
sum = 0
for i in N:
    sum = sum + int(i)
if not sum == 0:
    r = int(N) % sum
    if r == 0:
        print('yes')
    else:
        print('no')

Submission status: Wrong Answer

Solution code:
S = input()
l = [int(x) for x in list(str(S))]
total = sum(l)
if int(S)%total==0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

n = input()
prob(n)

Submission status: Wrong Answer

Solution code:
N = input()
sum = 0
for i in N:
    sum = sum + int(i)
r = int(N) % sum
if r == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=len(str(a))
if a%b==0:
   print("Yes")
else:
   print("No")

Submission status: Wrong Answer

Solution code:
N = 999999999
i = 0
wa = 0
while i < len(str(N)):
    wa = wa + int(str(N)[i:i+1])
    i += 1
if N % wa == 0:
    print("Yes")
elif N % wa != 0:
    print("No")

Submission status: Wrong Answer

Solution code:
import math 
def S(N):
    s = 0
    n = N
    while n != 0:
        s += n % 10
        n /= 10
        n = math.floor(n)
    return s


N = int(input())
S = S(N)
# print(N)
# print(S)
print(N % S == 0)

Submission status: Wrong Answer

Solution code:
n = input()

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

n = int(n)

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

Submission status: Wrong Answer

Solution code:
S = input()
l = [int(x) for x in list(str(S))]
total = sum(l)
if int(S)%total==0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
def S_n(n):
    num = []
    sum = 0
    while n != 0:
        num.append(n % 10)
        n = int(n / 10)
    for i in num:
        sum += i

    return sum

if __name__ == "__main__" :
    num = int(input())
    wa = S_n(num)
    # print(wa)
    if(num % wa == 0):  print("YES")
    else:  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
while N > 0:
    S.append(N % 10)
    N //= 10

Sum = 0
for i in S:
    Sum += i
if N % Sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
nb = bin(n)
nbs = str(nb)
nbs = nbs[2:]
sum = 0
for num in nbs:
    numint = int(num)
    sum = sum + numint
amari = n % sum
if amari == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
num = []
tmp = n
while 1:
    if tmp == 0:
        break
    num.append(int(tmp % 10))
    tmp //= 10
s = sum(num)
if n % s == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
N=int(input())
la=[]
buff=0
for i in range(10):
    if(i!=0):
        la.append(int(N/10**i))
    elif(i==0):
        la.append(N%10)
buff=sum(la)
if(N%buff==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

def main():

    a=input()
    a2=[int(x) for x in list(str(a))]
    c=int(0)
    
    for b in a2:
        c=c+b

    if c%int(a) == 0:
        print("Yes")
    else:
        print("No")
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N=int(input())
la=[]
buff=0
for i in range(9):
    if(i!=0):
        la.append(int(N/10**i))
    elif(i==0):
        la.append(N%10)
buff=sum(la)
if(N%buff==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()
n = int(N)
waru = 0
for i in N:
    waru += int(i)
    print(waru)

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

Submission status: Wrong Answer

Solution code:
S= input().split() 

print(S)
a=0

sum=0
for i in S[0]:
	
	sum=sum+int(i)



anser=int(S[0])%sum






if anser == 0:
	print("Yes")

else : print("No")

Submission status: Wrong Answer

Solution code:
# https://beta.atcoder.jp/contests/abc101/tasks/abc101_b
# B - Digit Sums

# B_Digit_Sums.py

N = int(input())
str_N = str(N)

S_N = 0
for i in range(len(str_N)):
    S_N += ( N % (10 ** (i+1)) ) // ( N // (10 ** i) )
print(S_N)

Submission status: Wrong Answer

Solution code:
N=int(input())
la=[]
buff=0
for i in range(1,9):
    la.append(int(N/10**i))
la.append(N%10)
buff=sum(la)
if(N%buff==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int(x) for x in str(N)]
print(sum(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = 0
divid = N
while divid != 0:
    amari = divid % 10
    divid = int(divid / 10)
    S += amari

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

Submission status: Wrong Answer

Solution code:
N = input()
n = int(N)
waru = 0
for i in N:
    waru += int(i)
    print(waru)

if((n % waru) == 0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(str(n))
s = 0
for i in l:
    s += int(i)
if n>=s and n//s == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = input()
sum = 0
for letter in n:
    sum = sum + int(letter)
print('Yes' if int(n)%sum==0 else 'NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def keta(x):
  wa = 0
  while x >= 0:
    wa = int(x % 10)
    x = x // 10
  return wa

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
nn=n
l=len(str(n))
k=0
for i in range(n):
    k+=n%10
    n=n//10
print(['No','Yes'][nn%k==0])

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

L = len(str(N))
S = sum([N // 10**i for i in range(1, N+1)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def answer(n: int) -> str:
    temp = n
    sum_of_digits = 0

    while 0 < temp:
        temp, mod = divmod(temp, 10)
        sum_of_digits += mod

    return 'Yes' if n % sum_of_digits == 0 else 'No'


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


if __name__ == '__main__':
    main()

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:
n = int(input())
def sum_digit(x):
    if x < 10:
        return x
    else:
        return x%10 + sum_digit(x//10)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
N = int(input())

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


SUM = 0
for i in range(len(LN)):
    SUM = SUM + LN[i]
    
if N % SUM == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
sum=0
for i in a:
    sum=sum+ord(i)-48

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
n=str(n)
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 = int(input())
x = n
sum = 0
while x:
    sum += (x % 10)
    x //= 10
if(n % sum == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
k = 0
tmp = n

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(str(n))
for i in range(len(s)):
  s[i]=int(s[i])
b=sum(s)
a=n%b

if a==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:
def s(n):
  res = 0
  while n > 0:
    res += n % 10
    n //= 10
  return res

n = int(input())
if n % s(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())
d = len(str(N))
S = 0
n = N

for i in range(d):
    S += n % 10
    n //= 10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(input())

    return N


def S(n: int) -> int:
    """
    各桁の和を取得する.

    Args:\n
        n (int): 整数

    Returns:\n
        int: 各桁の和
    """
    return sum(map(int, str(n)))


def main(N: int) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 整数(1 <= N <= 10**9)
    """
    # 求解処理
    ans = str()
    if N % S(N) == 0:
        ans = "Yes"
    else:
        ans = "No"

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N = get_input()

    # メイン処理
    main(N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
M = N
sum = 0
while True:
  if N == 0:
    break
  sum += N%10
  N = (N//10)
print('Yes' if M % sum == 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力を取得
N = int(input())

# 求解処理


def S(n: int) -> int:
    return sum(map(int, str(n)))


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

# 結果出力
print(ans)

Submission status: Accepted

Solution code:
import math
import statistics
# a=int(input())
b=input()
c=[]
for i in b:
    c.append(int(i))
# e1,e2 = map(int,input().split())
# f = list(map(int,input().split()))
#j = [input() for _ in range(3)]
# h = []
# for i in range(e1):
#     h.append(list(map(int,input().split())))

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

Submission status: Accepted

Solution code:
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
s = sum(int(c) for c in str(n))
if n % s == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

sum_digits = 0
for c in str(n):
    sum_digits += int(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
S_N = sum(list(map(int, list(str(N)))))
ans = N % S_N
print("Yes") if ans == 0 else print("No")

Submission status: Accepted

Solution code:
def s(n):
    ans = 0
    for ch in str(n):
        ans += int(ch)

    return ans


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

    sn = s(n)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    s = 0

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

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = list(map(int, input()))
N=0
for i in range(len(li)):
  N=N+li[len(li)-1-i]*10**i
S=sum(li)
if N%S==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
import sys
import math

def input():
    return sys.stdin.readline().rstrip()

def main():
    N = input()
    n = int(N)
    s = 0

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


if __name__ == "__main__":
    main()