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:
#080B
n=int(input())
d_n=n
f=0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = input()
B = []
for n in N:
    B.append(int(n))
if int(N)%sum(B)==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=input()
f=0

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

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

Submission status: Accepted

Solution code:
x = int(input())

def f(x):
  n = len(str(x))
  clasSum = 0
  for i in range(n):
    s = str(x)[i]
    clasSum += int(s)
  return clasSum
if x % f(x) == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
""" AtCoder """

N = int(input())

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

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

Submission status: Accepted

Solution code:
#ABC 080 B - Harshad Number
n = int(input())
if n%sum([int(c) for c in str(n)]) == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def isHarshad(x):
    s = str(x)

    num = 0

    for c in s:
        num += int(c)

    return True if x % num == 0 else False


N = int(input())
print("Yes" if isHarshad(N) else "No")

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


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

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


#n = ip()                              #入力整数1つ
#a,b= (int(i) for i in input().split())      #入力整数横2つ
#n,x,y= (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                   #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)


#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
s = 0
for i in range(len(a)):
    s+= int(a[i])
j(int(a)%s ==0)

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())
s = N
t = 0
while s != 0:
    t += s % 10
    s //= 10
if N % t == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def sumDigit(i):
  if i > 0:
    return sumDigit(i // 10) + i % 10
  else:
    return 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Harshad Number
import sys

N = int(input())

def getAns(n) :
    total = 0
    wkN = n
    while wkN > 0 :
        total = total + (wkN % 10)
        wkN = wkN // 10
    if n % total == 0 :
        return "Yes"
    else :
        return "No"

print(getAns(N))

Submission status: Accepted

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

if int(x)%a==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:
int_n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=sum(map(int,str(N)))

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

Submission status: Accepted

Solution code:
N = int(input())

def calcSumOfDigits(N):
    sum = 0
    for s in str(N):
        sum += int(s)
    return sum

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

Submission status: Accepted

Solution code:
str       = input()
input_val = int(str)
sum = 0

for i in str:
    sum += int(i)

mod = divmod(input_val ,sum)
mod = mod[1]

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

Submission status: Accepted

Solution code:
N = int(input())

def findsum(n):
    mysum = int(0)
    while(n > 0):
        mysum += int(n % 10)
        n /= int(10)
    return mysum

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

Submission status: Accepted

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

Submission status: Accepted

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

v = 0
while n > 0:
    v += n % 10
    n //= 10

b = (nn % v == 0)

print(['No', 'Yes'][b])

Submission status: Accepted

Solution code:
def func(n):
    if n < 10:
        return n

    return n % 10 + func(n // 10)


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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
f = 0

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

Submission status: Accepted

Solution code:
# ABC 080
def getInt(): return int(input())
def db(x): 
    global debug
    if debug: print(x)
debug = False

def getDigitList(n):
    list = []
    while n>0:
        list.append(n%10)
        n //= 10
    if list==[]: list = [0]
    return list
N = getInt()
dsum = sum(getDigitList(N))
db(dsum)
if N%dsum==0: print('Yes')
else: print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(N):
    fn = sum(int(i) for i in list(N))
    if int(N) % fn == 0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main(input())

Submission status: Accepted

Solution code:
N = int(input().strip())
Ns = list(map(int,list(str(N))))
if (N % sum(Ns) == 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())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(n):
    return sum(map(int,str(n)))
    
n = int(input())
print(["No","Yes"][n%f(n)==0])

Submission status: Accepted

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

N = input()
A = list(N)
tmp = 0
for a in A:
    tmp += int(a)

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

Submission status: Accepted

Solution code:
N = input()

total = 0
for n in N:
    total += int(n)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
checkn = N
if(N == 0):
  print("No")
  exit()

length = len(str(N))
sum = 0
for i in reversed(range(0, length)):
  num = math.floor(N/10**i)
  sum += num
  N -= num * (10**i)
  
if(checkn % sum == 0):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

N=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=input()
l=list(map(int,list(n)))
s=0
for i in l:
  s+=i
if int(n)%s:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
n=int(N)
T=[]
while N != 0:
	T.append(N % 10)
	N //= 10
T.reverse()
S=sum(T)
if n % S==0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=eval("+".join(str(n)))
if n%s==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def ii():
    return int(input())


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


def sum_digits(n: int, base: int) -> int:
    if n < base:
        return n
    else:
        return sum_digits(n // base, base) + (n % base)


N = int(input())
s = sum_digits(N, 10)
print("Yes" if N % s == 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_num = int(sys.stdin.readlines()[0].strip())
digit_total = 0
for digit in str(input_num):
  digit_total += int(digit)

if input_num % digit_total == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_Beginners_Contest083-B
#  https://atcoder.jp/contests/abc080/tasks/abc080_b

def sumKeta(number):
	number2Str = str(number)
	numberLength=len(number2Str)
	thisNumberSum = 0
	ketaRange = range(0,numberLength,1)
	for i in ketaRange:
		thisNumberKeta = int(number2Str[i])
		thisNumberSum = thisNumberKeta + thisNumberSum

	return thisNumberSum


def  isThisHarshadNumber(objectNumber):
	digitSumNumber=sumKeta(objectNumber)
	modNumber = objectNumber % digitSumNumber
	if modNumber ==  0:
		answer = "Yes"
	else:
		answer = "No"
	return answer


if __name__ == '__main__':
	N = int(input().strip())
	solution=isThisHarshadNumber(N)
	print(solution)

Submission status: Accepted

Solution code:
# coding: utf-8
N = input()
f = sum(int(i) for i in N)
print(["No", "Yes"][int(N) % f == 0])

Submission status: Accepted

Solution code:
def abc080_b():
    n = x = int(input())
    dig_sum = 0

    while n:
        dig_sum += n % 10
        n //= 10

    if x % dig_sum:
        print("No")
    else:
        print("Yes")


abc080_b()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

    s = str(n)
    base = 0
    for i in range(len(s)):
        base += int(s[i])

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
m=n
s=0
while True:
  q,mod=divmod(m,10)
  s+=mod
  m=q
  if q<=0:
    break
if n%s==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calculate_sum_of_digits(n):
    result = 0
    while n != 0:
        result += (n % 10)
        n //= 10

    return result


n = int(input())
sum_of_digits = calculate_sum_of_digits(n)
result = False
if n % sum_of_digits == 0:
    result = True

print("Yes" if result else "No")

Submission status: Accepted

Solution code:
inp = input()
n_list = list(map(int, [i for i in inp]))
n = int(inp)
ans = 0
for i in n_list:
    ans += i
if n % ans == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())

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

Sum=0

for i in range(len(l)):
    Sum+=int(l[i])

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

Submission status: Accepted

Solution code:
N = input()
N_list = list(N)
N_list_i = [int(s) for s in N_list]
total = sum(N_list_i)
if (int(N)%total):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
N = input()
Nlist = list(N)
sum = 0
for n in Nlist:
    sum += int(n)
if int(N)%sum == 0:
    print("Yes")
else:
    print("No")
#go

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calculate_summary_of_digits(n):
    result = 0
    while n != 0:
        result += (n % 10)

        n //= 10

    return result


n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())


def sum_digits(n):
    result = n % 10
    while n // 10 != 0:
        n //= 10
        result += (n % 10)

    return result


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input().rstrip()

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
X = list(x)
X_ = [int(i) for i in X]
num = 0
for i in X_:
    num += i
x = int(x)
if x%num == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

sum = 0
for s in S :
	sum += int(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(X):
	return sum([int(c) for c in str(X)])


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

li = []
for i in range(len(n)):
    li.append(int(n[i:i+1]))

fn = sum(li)

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

Submission status: Accepted

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

while n>0:
	nsum += (n%10)
	n = n//10

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

F = sum(list(map(int, list(N))))
X = int(N)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def main() -> None:
    n = int(next_str())
    print("Yes" if n % sum(map(int, str(n))) == 0 else "No")


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n = int(input())
s = str(n)

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

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

Submission status: Accepted

Solution code:
def f(X):
	total = 0
	while X > 0:
		total += X % 10
		X = X // 10
	return total

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(n)

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input();print('YNeos'[int(s)%eval('+'.join(s))>0::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = input()

fx = 0
for x in X:
    fx += int(x)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


N = input()
num = int(N)
N = map(int, list(N))
s = sum(N)

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

Submission status: Accepted

Solution code:
N = input()
f = 0

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

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

Submission status: Accepted

Solution code:
n_str = input()
n_int = int(n_str)
digits_sum = sum(list(map(int, list(n_str))))

if n_int % digits_sum:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
N = list(input())
a = ""
for i in range(len(N)) :
    a += N[i]
    N[i] = int(N[i])
a = int(a)
n = sum(N)
if a % n == 0 :
    print("Yes")
else :
    print("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:
import sys
stdin = sys.stdin

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = sum([int(b) for b in str(N)])

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def degitSum(num):
    buf_string = str(num)
    array = list(map(int, list(buf_string)))
    return sum(array)

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

Submission status: Accepted

Solution code:
N = int(input())
M = str(N)
num = 0
for i in M:
    num += int(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ntmp = n
sum = 0

while True:
    sum += ntmp % 10
    ntmp = ntmp // 10
    if ntmp == 0:
        break

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

else:
    print("No")

Submission status: Accepted

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

sum =0
index=0
while index < len(listN):
    sum+=listN[index]
    index+=1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
n_list = list(str(n))
fn = 0
for number in n_list:
    fn += int(number)
if n % fn == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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