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())
k = n
m = 0
while k > 0:
    m += k % 10
    k = k // 10

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    N = int(input())
    t = sum(int(s) for s in str(N))
    if N % t == 0:
        print(Yes)
    else:
        print(No)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = input()
S = 0
for _ in str(N):
  S = S + int(_)
a = "Yes" if int(N) % S == 0 else "No"
print(a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = input()
number = 0
for i in num:
    number += int(i)
print("Yes" if int(num) % number == 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:
s=input()
a=sum(map(int,s))
print("No"if int(s)%a else "Yes")

Submission status: Accepted

Solution code:
n = input()

a = 0

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

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

Solution code:
s=input();
a=sum(list(int(c)for c in s));
print("Yes"if int(s)%a<1 else"No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def sum_digits(n):
    s = 0
    while n:
        s += n % 10
        n //= 10
    return s


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

Submission status: Accepted

Solution code:
n = raw_input().strip()
print "Yes" if (int(n)%sum([int(x) for x in 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:
l = input()
n = int(l)
s = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = input()

S = 0
for i in A:
  S = S + int(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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: Accepted

Solution code:
N = int(raw_input())
n = N
S = 0
while n != 0:
    S += n % 10
    n //= 10

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

Submission status: Accepted

Solution code:
N = str(input())


S = sum([int(i) for i in N])

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

Submission status: Accepted

Solution code:
n = input()

s = sum(int(i) for i in n)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def S(n):
	return sum([int(m) for m in str(n)])

n = int(input())

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

Submission status: Accepted

Solution code:
import math
n = int(input())
n1 = n

m = 0
k = int(math.log10(n)+1)
for i in range(k):
    m += n%10
    n = int(n/10)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = raw_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 = input()
NB = list(N)
NN = int(N)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

B(input())

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())
val = n
s = 0
while val is not 0:
    s += val % 10
    val //= 10
if n % s == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
def s(n):
	r = 0
	while n:
		r += n%10
		n /= 10
	return r
print "Yes" if n%s(n) == 0 else "No"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input());print(["No","Yes"][N%sum(list(map(int,str(N))))<1])

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N = input()
a = len(N)
b = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output
def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

# Binary converter
def to_bin(x):
    return bin(x)[2:]

# --------------------------------------------

dp = None

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

    Sn = 0
    for n in str(N):
        Sn += int(n)

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

main()

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

Submission status: Accepted

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

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


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
A = list(map(int, N.rstrip()))
n = 0
c = 0

for i in A:
    n += A[c]
    c += 1

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

Submission status: Accepted

Solution code:
# your code goes here
import copy
N=int(input())
k = copy.copy(N)

a=[]
while k != 0:
	a.append(k%10)
	k = k//10

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

Submission status: Accepted

Solution code:
n = input()
# n = '999999999'
n_to_string = sum(map(lambda x: int(x), list(n)))

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

Submission status: Accepted

Solution code:
N = int(input())
xx = str(N)
NN = list(xx)
x = len(NN)
SN = 0
for i in range(x):
	SN += int(NN[i])

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

Submission status: Accepted

Solution code:
s = input()
l = list(s)
sn = 0
for x in l:
  sn += int(x)

sn = int(sn)
s = int(s)

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

Submission status: Accepted

Solution code:

N = int(input())

N_str = str(N)
S = sum([int(N_str[i]) for i in range(len(N_str))])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

n = int(N)
SN = 0
for i in N:
    SN += int(i)

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

Submission status: Accepted

Solution code:
s = input()

print("No" if int(s) % sum(map(int, list(s))) else "Yes")

Submission status: Accepted

Solution code:
N = long(raw_input())
S = 0
tN = N
while tN > 0:
  S += tN % 10
  tN /= 10
print 'Yes' if N%S == 0 else 'No'

Submission status: Accepted

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

Submission status: Accepted

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

k = 0

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
N = 0

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

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(0,-1),(1,0),(0,1),(-1,0)]
ddn = [(0,-1),(1,-1),(1,0),(1,1),(0,1),(-1,-1),(-1,0),(-1,1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

def main():
    s = S()
    n = int(s)
    t = sum([int(c) for c in s])
    if n % t == 0:
        return 'Yes'

    return 'No'



print(main())

Submission status: Accepted

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: 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:
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:
# -*- coding: utf-8 -*-
n = int(input())
on = n
sn = 0
while n >= 10:
    n, s = divmod(n, 10)
    sn += s
sn += n

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

Submission status: Accepted

Solution code:
n = int(input())

a = str(n)
b = len(a)

li = []

for i in range(0,b) :
    c = a[i]
    li.append(int(c))

d = sum(li)

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

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:
num = input()
n = int(num)
div = [int(i) for i in list(num)]
# print(div)

if n%sum(div):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

Solution code:
def main():
    N = int(raw_input())

    n = N
    sN = 0
    i = 1000000000
    while i > 0:
        sN += n/i
        n -= n/i * i
        i = i/10
    if N % sN == 0:
        print 'Yes'
    else:
        print 'No'

main()

Submission status: Accepted

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

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

tmp = int(num/sum)
if tmp*sum == num:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
strN=input()
N = int(strN)
S = sum([ int(c)  for c in strN])

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

Submission status: Accepted

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

a = int(input())

s = 0

for i in str(a):
    s += int(i)

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

Submission status: Accepted

Solution code:
def main():
    N = input()
    Sn = 0
    for n in N: Sn += int(n)
    print('Yes' if int(N) % Sn == 0 else 'No')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:


def s(n):
	sum = 0
	for c in str(n):
		sum += int(c)
	return sum

n = int(input())

sum = s(n)

mod = n % sum

if mod == 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
num = list(N)
s = 0
for i in range(len(num)):
  s += int(num[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:
def main():
    N = input()
    Sn = 0
    for n in N: Sn += int(n)
    if int(N) % Sn == 0:
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def s(n):
	return sum([int(m) for m in str(n)])

n = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
print(['Yes', 'No'][int(s) % sum(map(int, s)) != 0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

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

Submission status: Accepted

Solution code:
N = input()
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: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()
ans = "No"
sn = 0

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

if int(N) % sn == 0:
    ans = "Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().strip()
N = int(l)
d = 0
for i in range(len(l)):
    d+=int(l[i])
if N%d !=0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = 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=input()
print(["Yes","No"][int(n)%sum(list(map(int,list(n))))>0])

Submission status: Accepted

Solution code:
N = raw_input()

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

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

Submission status: Accepted

Solution code:
N = int(input())

s = sum([int(i) for i in str(N)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
li = list(n)

sn = 0

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

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

# print(sn)

Submission status: Accepted

Solution code:
N = int(input())
S = str(N)
d = 0
for k in S:
    d += int(k)
print("Yes" if N%d==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:
S=input()
SUM=0
for J in S:
	SUM+=int(J)
S=int(S)
if S/SUM==S//SUM:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):#AtCoder Beginner Contest 101 b
    s=0
    for c in str(n):
        s=s+int(c)#'int'数値ではないものを数値にする'str'文字列じゃないものを文字列にする関数
    if n%s==0:
        return 'Yes'
    else:
        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: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a):
    s = 0
    for b in str(a):
        s += int(b)
    if a%s==0:
        return "Yes"
    else:
        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: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve (N):
    s=0
    for b in str(N):

        s = s + int(b)
    if N % s ==0:
        return 'Yes'
    else:
        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: Accepted

Solution code:
import sys

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

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

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

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline()
x = s.rstrip()
y = 0
for i in str(x):
    y+=int(i)
if int(x) % y==0:
    print('Yes')
else:
        print('No')

Submission status: Accepted

Solution code:
import sys

def solve(n):
    ii=0
    for s in str(n):
        ii += int(s)
    if n%ii==0:
        return "Yes"
    else:
        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: Accepted

Solution code:
import sys

def solve(n):
    a = 0
    for s in str(n):
        a += int(s)
    if n%a == 0:
        return("Yes")
    else:
        return("No")

def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a] = line.split(' ')
    return (int(str_a))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

int_n = int(n)

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

S = 0

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

#print(S)

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

else:
    print("No")

Submission status: Accepted

Solution code:
s = int(input().strip())
s_n = 0
num = list(map(int, str(s)))

for i in range(len(num)):
    s_n += num[i]

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

Submission status: Accepted

Solution code:
def s(n):
    ret=0    
    for i in range(15):
        ret+=(n%10**(i+1))//10**i
    return ret

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

Submission status: Accepted

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: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

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 n:
    sn += int(i)

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

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
    s = str(n)
    array = list(map(int, list(s)))
    N=sum(array)
    if n%N==0:
        return "Yes"
    else:
        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: Accepted

Solution code:
N = input()
N0 = list(N)

A = 0

for i in N0:   #N0の中身はlistで一桁ずつ並んでいる，iはi番目のN0の要素を示す
    A = A + int(i)

B = int(N) % A    #BはNをAで割ったときの余り

if B == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def getinputdata():

    array_result = []    
    array_result.append(input().split(" "))

    flg = True

    try:
        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

s= arr_data[0][0]

sumdata=sum(list(map(int, list(s))))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def func(n):
    if n == 0:
        return 0
    return n % 10 + func(n // 10)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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
if N % S == 0:
    print "Yes"
else:
    print "No"

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

n = int(input(""))

sn_array = list(map(int, list(str(n))))
sn = sum(sn_array)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(input())
su = 0
s = 0
k = 0
for i in a:
  s += int(i)
a.reverse()
for i in a:
  su += int(i)*pow(10,k)
  k += 1
  
if su % s == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

	
n = int(input())

sum = digitSum(n)

if n % sum == 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:
n = int(input())

s = 0

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import atexit,io,sys,os,math
from collections import OrderedDict
buffer=io.BytesIO()
sys.stdout=buffer
@atexit.register
def write():
    sys.__stdout__.write(buffer.getvalue())


s=raw_input().strip()
sm=0
for i in s: sm+=int(i)
s=int(s)
print("%s"%{True:"Yes",False:"No"}[(s-(s/sm)*sm)==0])

Submission status: Accepted

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