Problem:


Score : 200 points

Problem Statement

An integer X is called a Harshad number if X is divisible by f(X), where f(X) is the sum of the digits in X when written in base 10.

Given an integer N, determine whether it is a Harshad number.

Constraints

1?N?10^8

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print Yes if N is a Harshad number; print No otherwise.

Sample Input 1

12

Sample Output 1

Yes

f(12)=1+2=3. Since 12 is divisible by 3, 12 is a Harshad number.

Sample Input 2

57

Sample Output 2

No

f(57)=5+7=12. Since 57 is not divisible by 12, 12 is not a Harshad number.

Sample Input 3

148

Sample Output 3

No



Sample input:
12


Sample output:
Yes

Submission status: Accepted

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

X = input()

Xdic = list(X)
fx = 0

for i in Xdic:
    fx += int(i)
    #print(fx)

par = int(X)%fx

if(par == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()
fx = list(map(int, str(N)))
X = int(N)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N = int(input())
n = N
sumup = 0
while N != 0:
    #print(N % 10)
    sumup += (N % 10)
    N = N // 10
#print(n, sumup)
if n % sumup == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
M = input()
N = int(M)
p = 0
q = 0

for i in range(len(M)):
  q = int(M[i])
  p += q

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        line = line.rstrip("\n")
        n = int(line)
        s = sum(map(lambda x: int(x), line))
        if n % s == 0:
            print("Yes")
        else:
            print("No")
        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

Solution code:
n = int(input())

def g(N):
    ans = 0
    while N != 0:
        ans += N % 10
        N = N //10
    return ans

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

Submission status: Accepted

Solution code:
N = input()
num = int(N)
N = map(int, list(N))
SUM = sum([i for i in N])

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

Submission status: Accepted

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

n = raw_input()
n = int(n)
s = n + 0
h = 0
i = 8
while i >= 0:
    t = s / (10 ** i)
    h += t
    s -= t * (10 ** i)
    #print t,
    i -= 1

#print ""
#print h

if n % h == 0:
    print "Yes"
else:
    print "No"

Submission status: Accepted

Solution code:
N = int(raw_input())
g = 0 
for i in list(str(N)):
    g += int(i)
if N % g == 0:
    print "Yes"
else:
    print "No"

Submission status: Accepted

Solution code:
n = input()
f = sum([int(el) for el in n])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())
temp = N
s = 0

while (temp != 0):
    temp, mod = divmod(temp, 10)
    s += mod

print("No" if N % s else "Yes")

Submission status: Accepted

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

"""abc080_b"""


import sys

from functools import reduce

def main():
    """Main function."""
    n = int(input())
    sum_digits = reduce(lambda a, b: a + b, map(int, str(n)))

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



if __name__ == '__main__':
    sys.exit(main())

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

n = sys.stdin.readline().strip()
sys.stdout.write("Yes" if int(n) % sum(map(int, n)) == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
ans = 'No'
n = int(stdin.readline())
m = n
s = 0
while m:
 s += m%10
 m/=10
if n%s==0:
 ans = 'Yes'
print ans

Submission status: Accepted

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

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
def solve():
    S = input()
    N = list(S)
    N = [int(x) for x in N]
    summation = sum(N)
    if int(S) % summation == 0:
        print("Yes")
    else:
        print("No")
       
      
solve()

Submission status: Accepted

Solution code:
N = input()
N_int = int(N)
N_split = list(map(int, list(N)))
N_sum = sum(N_split)

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

Submission status: Accepted

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

#f(N)を求める
f_sum=0
while(N>0):
    f_sum+=N%10
    N=int(N/10)
# print(f_sum)
# print(N_sub)
if N_sub%f_sum==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = input()

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

list_n = str(n)
h = 0
for l in list_n:
    h += int(l)

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

Submission status: Accepted

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

ret2 = 0
for i in range(0, len(num)):
    ret2 += int(num[i])
print("Yes" if ret % ret2 == 0 else "No")

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readline().strip()

N = int(line)
fn = sum(int(c) for c in line)

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

Submission status: Accepted

Solution code:
n = int(input())

def judge(num):
	if 0 <= num <= 9:
		return num
	else:
		return judge(num//10) + num%10
		
if n % judge(n) == 0:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
s = input()

n = int(s)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
fx = sum(map(int, list(N)))
if int(N) % fx:
    print("No")
else:
    print("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:
def main():
    N = int(input())
    M = list(map(int, list(str(N))))

    t = 0
    for m in M:
        t += m

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = raw_input().strip()
i = int(a)
b = 0
for x in a:
	b += int(x)
if i%b == 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:
N = input()
sum = 0
for i in N:
    sum += int(i)
if int(N)%sum==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = input()
s = sum(list(map(lambda x: int(x), N)))
print('Yes' if int(N) % s == 0 else 'No')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = input()
    harshad = 0
    for i in range(len(N)):
        harshad += int(N[i])

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

Submission status: Accepted

Solution code:
import sys

n = int(sys.stdin.readline().strip())

tmp = n
s = 0

while tmp != 0:
    s += (tmp%10)
    tmp = int(tmp/10)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

n=0
M=N
while(1):
    n+=N%10
    N=N//10
    if(N==0):
        break
if(M%n==0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import heapq
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect, bisect_left, bisect_right
from collections import defaultdict, deque

# d = defaultdict(lambda: 0)
# setrecursionlimit(10**7)
# inf = float("inf")


##### stdin ####
def LM(t, r): return list(map(t, r))
def R(): return stdin.readline()
def RS(): return R().split()
def I(): return int(R())
def F(): return float(R())
def LI(): return LM(int,RS())
def LF(): return LM(float,RS())
def ONE_SL(): return list(input())
def ONE_IL(): return LM(int, ONE_IL())
def ALL_I(): return map(int, stdin)
def ALL_IL(): return LM(int,stdin)

##### tools #####
def ap(f): return f.append
def pll(li): print('\n'.join(LM(str,li)))
def pljoin(li, s): print(s.join(li))



##### main #####

def f(x):
	return sum(LM(int, list(str(x))))

def main():
	x = I()
	if x%f(x) == 0:
		print("Yes")
	else:
		print("No")



if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def read(): return list(map(int, input().split()))

def f(x):
    r = []
    while x > 0:
        r.append(x%10)
        x = x//10
    return sum(r)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()
s = sum([ord(c) - ord('0') for c in N])

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

Submission status: Accepted

Solution code:
N = int(input())

def harshad(n):
    str_n = list(str(n))
    sum_str_n = 0
    for i in str_n:
        sum_str_n += int(i)

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

harshad(N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = input()
h = 0

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

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

Submission status: Accepted

Solution code:
N=int(raw_input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# My code doesnt work, I have no idea why
# My code works, I have no idea why
n = str(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:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
f = 0
for x in str(n):
    f += ord(x) - ord('0')
print("Yes" if n % f == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(inpit())
h = (n - 1)% 9
h += 1
if n % h == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
h = n % 9
if n % h == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(inpit())
h = n % 9
if n % h == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
m = list(n)
print(m)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=len(n)
N=''
for i in range(s[:s+1:-1]):
    a = n % (10**i)
    N.append(a)
al = sum(N)
if n%al == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n=int(input())
s=len(n)
N=''
for i in range(s[:s+1:-1]):
    a = n % (10**i)
    N.append(a)
al = sum(N)
if al%n == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

f = False

x = sum(map(int,list(n)))

if n % x == 0:
    f = True

if f:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input()
a = int(x)
b = list(x)
b = sum(b)

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

Submission status: Runtime Error

Solution code:
N = input()
Nnum = int(N)
Nls = list(N)
FN = sum(Nls)
if Nnum%FN == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N=input()
a=int(N)
b=list(N)
sum=0

for i in b:
  sum+=i
 
if a%sum==0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N=int(input())
input_list=map(int,input().split(" "))

max_input=max(input_list)
Sum_input=sum(input_list)-max_input
if max_input<Sum_input:
  print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
f=0
frag='No'
for i in 8:
  f+=n%(10**(i+1))//10**i
if n%f==0:
  frag='Yes'
print(frag)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
n = int(N)
sum = 0
a = list(input())
for i in range(len(a)):
    sum += int(a[i])

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
def f(N):
  i=0#桁数
  while N>1:
    N=N/10
    i+=1
  return i

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

Submission status: Runtime Error

Solution code:
N=int(input())
def f(N):
  i=0#桁数
  while N>1:
    N=N/10
    i+=1
  return i

x=f(N)
if N%x==0:
  print("yes")
else: print("no")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = input()

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

Submission status: Runtime Error

Solution code:

N = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def resolve():
    # 整数 1 つ
    n = int(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    m = n
    sumM = 0
    while m > 0:
        sumN += (m % 10)
        m /= 10

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

Submission status: Runtime Error

Solution code:
n = int(input())
num = n
f = 0
while True:
    if num == 0:
        break
    f += num%10
    num = num//10

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

Submission status: Runtime Error

Solution code:
n=int(input())
l=[int(i) for i in str(n)]
if n%sum(l)==0:
  print(yes)
else:
  print(no)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

par = input()

val = int(par)

valA = int(list(par)[0])
valB = int(list(par)[1])



if val % (valA+valB) == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N=str(input())

f=int(N[0])+int(N[1])

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

Submission status: Runtime Error

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

n = int(input())

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

Submission status: Runtime Error

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

n = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = int(input())
x = 0

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

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

Submission status: Runtime Error

Solution code:
n = str(input())
l = len(n)
L = []
for i in range(l):
  a = n[i]
  l.append(a)
sum_L = sum(L)
if int(n) % int(sum_l) == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
n = str(input())
l = len(n)
L = []
for i in range(l):
  a = n[i]
  l.append(a)
sum_L = sum(L)
if int(n) % sum_l == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
n = str(input())
l = len(n)
L = []
for i in range(l):
  a = n[i]
  l.append(a)
sum_L = sum(L)
if n % sum_l == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print('Yes' if n%(a+b)==0 else 'No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def calc_sum_digits(n):
    sumd = 0
    while(n > 1):
        sumd += int(n%10)
        n /= 10
        
    return sumd

N = int(input())
sumd = 0
sumd = calc_sum_digits(N)
if(N%sumd == 0):
     print('yes')
else:
     print('No')

Submission status: Runtime Error

Solution code:
def calc_sum_digits(n):
    sumd = 0
    while(n > 1):
        sumd += int(n%10)
        n /= 10
        
    return sumd
 

 N = int(input())
sumd = 0
 
sumd = calc_sum_digits(N)
if(N%sumd == 0): print('yes')
else: print('No')

Submission status: Runtime Error

Solution code:
def calc_sum_digits(n):
    sumd = 0
    while(n > 1):
        sumd += int(n%10)
        n /= 10
        
    return sumd

N = int(input())
sumd = 0

sumd = calc_sum_digits(N)
if(N%sumd == 0): print('yes')
else: print('No')

Submission status: Runtime Error

Solution code:
x = input()

xi = int(x)
xs = sum(list(x))

if xi%xs==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sm = 0
for i in st:
  sm+=int(i)
if n%sm==0:
  print("Yes")
else
  print("No")

Submission status: Runtime Error

Solution code:
input(N)

def digitsum(a):
  x = 0
  while a > 0:
    x += a % 10
    a /= 10
  
  return x

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def f(x):
    ret = 0
    while x != 0:
        ret += x%10
        x //= 10
    return ret

n = int(input())
print("Yes" if x % f(x) == 0 else "No")

Submission status: Runtime Error

Solution code:
def f(x):
    ret = 0
    while x != 0:
        ret += x%10
        x //= 10

n = int(input())
print("Yes" if x % f(x) == 0 else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

X = int(input())

if X % f(X) == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

X = int8(input())

if X % f(X) == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N = int(input())

total = 0
for i in range(1,n+1):
    total += N[i]

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

Submission status: Runtime Error

Solution code:
N = int(input())

total = 0
for i in range(1,n+1):
    total += N

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())
def if_test:
    if N % sum(int(input())) == 0:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())
s = 0
for i in range(1,n+1):
    if N / sum(int(input())) == 0:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
fn = 0
for i in range(1, 9):
    fn += N // (10*i)
if N % fn == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys


def extract_digits(n):
    digits = []
    while n>0:
        digits.append(n%10)
        n = int(n/10)
    return digits


n = int(input())
digits = extract_digits(n)
for i in digits:
    if n % i == 0:
        print('Yes')
        sys.exit()
print('No')