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:
N = input()
L = 0

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
Ns = input()
Nn = int(Ns)

f = 0
for s in Ns:
    f += int(s)
if Nn % f == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def is_harshad(x):
    fx = sum([int(v) for v in x])
    if int(x) % fx == 0:
        return True
    else:
        return False

n = input()
if is_harshad(n):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

INF = float('inf')


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


def is_harshad(n):
    p = n
    tmp = 0
    while p >= 10:
        p, q = divmod(p, 10)
        tmp += q
    tmp += p

    if n % tmp == 0:
        return True
    else:
        return False


N = int(input())

if is_harshad(N):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=str(input())

X=int(N)
fx=0
for i in range(0,len(N)):
    fx+=int(N[i])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
N1=list(str(N))
f_N=0
for i in range(len(N1)):
    f_N+=int(N1[i])
print("Yes" if N%f_N==0 else "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 ceil(a, b):
    return (a + b - 1) // b


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

Submission status: Accepted

Solution code:
N = int(input())

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

if N % sum == 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:
#80b
n=input()
n_sum=0
for i in range(len(n)):
    n_sum+=int(n[i])
print('Yes' if int(n)%n_sum==0 else '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:]


def li_input():
    return [int(_) for _ in input().split()]


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

dp = None


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

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


main()

Submission status: Accepted

Solution code:
s=input();print("YNeos"[int(s)%sum(map(int,s))!=0::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input();print("YNeos"[bool(int(s)%sum(map(int,s)))::2])

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=int(input());print("Yes"if n%sum([int(m)for m in str(n)])==0 else"No")

Submission status: Accepted

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

solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
c = 0
for i in range(0,9):
    c = c + (a//(10**i))%10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
N=n
a=0
for i in range(8):
    if N==0:
        break
    else:
        a+=N%10
        N=int(N/10)
#print(a)
if n%a==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
#-*-coding:utf-8-*-

def main():
    n = input()
    sum_n = 0

    for i in n:
        sum_n += int(i)
    
    if int(n) % sum_n == 0:
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

print("Yes" if n % sum([int(m) for m in str(n)]) == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

print('Yes' if n2%ans==0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

def f(x):
    ret = 0
    while(x > 0):
        ret += x % 10
        x //= 10
    return ret

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Ns = input()

f = sum(map(int, Ns))
N = int(Ns)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
https://abc080.contest.atcoder.jp/tasks/abc080_b
"""
n=input()
a=0
for i in range(len(n)):
    a=a+int(n[i])
if int(n)%a==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
num = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

t = n 
a = 0
while t > 0 :
	a+= t%10
	t/= 10

print 'Yes' if n%a == 0 else 'No'

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
n_str = list(str(N))
n_list = list(map(int,n_str))

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

Submission status: Accepted

Solution code:
#N,A,B=map(int, input().split())

#A=list(map(int, input().split()))

N=int(input())
N1=N

ans=0

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

if N1%ans==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())


def f(x):
    y = 0
    while x > 0:
        y += x % 10
        x //= 10
    return y


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

Submission status: Accepted

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

f_x = 0
for i in N_s:
    f_x += int(i)
    
if N % f_x == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
fx=0
K=N
for i in range(len(str(N))):
    fx+=K%10
    K=K//10


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

X = N
sum1 = 0
# 各桁の和を出す
while N != 0:
    sum1 += N % 10
    N //= 10
    
# 判定する
if X % sum1 == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input().strip())
fn=sum(int(i) for i in str(N))
print(["No", "Yes"][N%fn==0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

fx = sum([int(s) for s in str(N)])
print("Yes") if N%fx == 0 else print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
count = 0

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

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    f = 0
    for n in str(N):
        f += int(n)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()

digitSum=0
for digit in N:
    digitInt = int(digit)
    digitSum += digitInt

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
l = list(map(int,str(n)))
print(('No','Yes')[int(n) % sum(l) == 0])

Submission status: Accepted

Solution code:
N = input()

sumN = 0
for i in list(N):
    sumN += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

fx = 0
length = len(N)
for i in range(length):
    fx = fx + int(N[i])

if int(N)%fx == 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:
N = int(input())
X = 0
n = N

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

Submission status: Accepted

Solution code:

N = int(input())

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

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

Submission status: Accepted

Solution code:
mohu=input()
N=int(mohu)
X=N
goukei=0
for i in range(len(mohu)):
    goukei+=N%10
    N=N/10
    N=int(N)
if X%goukei ==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
x = int(n)
y = sum(list(map(int, list(n))))
print(["No", "Yes"][x%y==0])

Submission status: Accepted

Solution code:
k = []
n = int(input())
m = n
while n != 0:
  k.append(n % 10)
  n //= 10
k.reverse()
s = sum(k)
if m % 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()
N_sum = 0
for s in N:
    N_sum += int(s)
if int(N) % N_sum == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

if n%(sum(list(map(int,list(str(n)))))):
    print('No')
else: print('Yes')

Submission status: Accepted

Solution code:
def cal(num):
  t = 0
  while num > 0:
    t += (num % 10)
    num //= 10
  return t
  
N = int(input(''))
total = cal(N)
if N % total == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def harshad(x):
	sum = 0
	for i in range(0, len(x)):
		sum = sum + int(x[i])
	if int(x)%sum == 0: return 'Yes'
	else: return 'No'

print harshad(raw_input())

Submission status: Accepted

Solution code:
N = int(input())

def f(X):
    current_num = X
    result = 0
    while(current_num > 0):
        result += current_num % 10
        current_num = current_num // 10
    return result


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

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
N = int(input())
n = str(N)
NN = list(int(i) for i in n)
if N % sum(NN) == 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:
n = int(input())
sum_head = 0
tmp = n
while tmp != 0:
    sum_head = sum_head + (tmp % 10)
    tmp = tmp // 10
if n % sum_head == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=input()

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

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

Submission status: Accepted

Solution code:
N = input()
n = 0
for a in N:
    n += int(ord(a) - ord('1') + 1)
if int(N) % n == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()

num = [int(i) for i in N]
f = sum(num)
if int(N)%f == 0:
    print("Yes")
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
tot = 0
for i in range (len(N)):
    tot += int(N[i])
print(["No", "Yes"][int(N)%tot == 0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

x = input()

fx = sum([int(num) for num in x])

print("Yes" if int(x)%fx == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
Sum = sum([int(s) for s in str(N)])
if N%Sum == 0:
    print("Yes")
else:
    print("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().strip()

n = ns()
a = int(n)
r = sum(map(int, list(n)))

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

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

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

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

x = arr_data[0][0]

mysum=0


for v in x:
    
    mysum+=int(v)
    
#print(mysum,int(x))
    
    
print("Yes" if int(x) % mysum ==0 else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
def solve(n):
  n=str(n)
  ans=0
  for i in range(len(n)):
    ans+=int(n[i])
  return ans

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

Submission status: Accepted

Solution code:
N = input()
A = int(N)
B = sum([int(n) for n in list(N)])

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

Submission status: Accepted

Solution code:
n=input()
print(['Yes','No'][int(n)%sum(map(int,list(n)))>0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
int_list = list(map(int, N))
judge_num = int(N)%sum(int_list)

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

Submission status: Accepted

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

while n / 10 != 0:
    a += (n % 10)
    n //= 10

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem B


def is_harshad_number(number):
    if number % sum_digit(number) == 0:
        return "Yes"
    else:
        return "No"


def sum_digit(number):
    return sum(list(map(int, list(str(number)))))


if __name__ == '__main__':
    number = int(input())

    result = is_harshad_number(number)
    print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

Solution code:
n = str(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())

L = [int(i) for i in list(str(N))]
sum__ = sum(L)

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

Submission status: Accepted

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

Submission status: Accepted

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

# Set 2 dimension list
def dim2input(N):
    li = []
    for _ in range(N):
        li.append(list(map(int, input())))
    return li

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

dp = None

def main():
    N = input()
    fx = 0

    for n in N:
        fx += int(n)

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n = input()
each_digits_sum = 0
for i in n:
    each_digits_sum += int(i)
if int(n) % each_digits_sum:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
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:
s = str(input())
c = 0
for i in range(len(s)):
    c = c + int(s[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
xb=x
fx=0
for i in [8,7,6,5,4,3,2,1,0]:
  fx += xb//10**i
  xb %= 10**i
if(x%fx==0):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input()
fig = list(map(int, list(s)))
l = len(s)

v = 0
for i in fig:
    v += i
if int(s) % v == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
N_temp=map(int,list(str(N)))
Nsum=sum(N_temp)

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

Submission status: Accepted

Solution code:
num = input()
fx = 0

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

if int(num) % fx == 0:
    print("Yes")
else:
    print('No')