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: Runtime Error

Solution code:
n = list(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))

fx = sum(n)

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
X = str(input())
tmp = 0
for i in range(len(X)):
  tmp += int(X[i])

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

Submission status: Runtime Error

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

def main():
    n = input()
    n_sum = sum([int(c) for c in n])
    if n % n_sum == 0:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
X = int(input())

def Sum_Digit(X):
  SUM = 0
  while X >= 1:
    SUM += X%10
    X = int((X - X%10)/10)
  return SUM

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

Submission status: Runtime Error

Solution code:
X = int(input())

def Sum_Digit(X):
  SUM = 0
  while X > 1:
    SUM += X%10
    X = int((X - X%10)/10)
  return SUM

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

Submission status: Runtime Error

Solution code:
N=int(input())
i=0
summ=0

def kakuwa(N):
  while N>10**i:
    i+=1
  for k in range(i+1)[::-1]:
    summ+=N//(10**k)
    N-=(10**k)*(N//(10**k))
  return(summ)

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

Submission status: Runtime Error

Solution code:
n=int(input())
i=int(list(str(n))[0])+int(list(str(n))[1])
if n%i==0:print("Yes")
else:print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

N = intinput()
tmp = N
divs = 0

while tmp:
    divs += tmp % 10
    tmp = int(tmp/10)

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

Submission status: Runtime Error

Solution code:
N = int(input())

def fx(N):
  ans = 0
  while N // 10 != 0:
    ans += N % 10
    N = N //10
  return ans
  
if N % fx(N) == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
i=len(n)
n=int(n)
m=0
while x>10:
    m+=x%10
if n%m==0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n=input()
i=len(n)
n=int(n)
m=0
while x>10:
    m+=x%10
if n%m==0
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
F=[int(input().replace(' ','')) for i in range(N)]
P=[list(map(int,input().split())) for i in range(N)]
print(max(sum([p[bin(f&i).count('1')] for f,p in zip(F,P)]) for i in range(1,2**10)))

Submission status: Runtime Error

Solution code:
X = int(input())
X_ = X
x_sum = 0
while True:
    if (X_ // 10) ==0 :
        break
    else:
        x_sum += X_ % 10
        X_ = X_ // 10
if X % x_sum == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(inout)
L = [int(j) for j in str(N)]
if N % sum(L) == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def solve(n):
  m = 0
  while n > 0:
    m += n%10
    n //= 10
  if m%n != 0:print("No")
  else:print("Yes")

n = int(input())
solve(n)

Submission status: Runtime Error

Solution code:
def solve(n):
  m = 0
  while n > 0:
    m += n%10
    n //= 10
  if m%n:print("No")
  else:print("Yes")

n = int(input())
solve(n)

Submission status: Runtime Error

Solution code:
N=int(input())
F=sum(list(str(N)))

ans="Yes"
if N%F:
  ans="No"
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = list(input())
f_N = 0
[f_N += int(i) for i in N]
print('Yes') if int(''.join(N))%f_N == 0 else print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
number = [int(s) for s in a]
total = sum(number)
if a % total ==0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
number = a.split()
total = sum(number)
if a % total == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
n = input()
n1 = list(input())
n1 = [int(x) for x in n]

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

N = int(input())
H = list(input())

harshad = 0

for i in H:
    harshad += int(i)

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=a
c=0
for i in range(len(str(a))):
  c+=b//10**(len(str(a))-i)
  b-=10**(len(str(a))-i)
print("Yes" if a%c==0 else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if int(n)%(int(f[0])+int(f[1])) == 0 :
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

N = int(input().split())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
)N = int(input())
fx = N
total = 0
while fx > 0:
  total += fx % 10
  fx // 10
if N % fx == 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(map(int,n))==0 else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
x = input()
if int(x) % (int(x[0])+int(x[1])) == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X = input()
sum_c = 0
for char in X:
  sum_c += int(char)
if X%sum_c == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    n = int(input())
    N = list(str(n))
    
    tmp = 0
    for i in N:
        tmp += i
        
    if n % tmp == 0:
        print("Yes")
    else:
        print("No")
            	
if __name__ == "__main__":
	main()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    n = int(input)
    N = list(str(n))
    
    tmp = 0
    for i in N:
        tmp += i
        
    if n % tmp == 0:
        print("Yes")
    else:
        print("No")
            	
if __name__ == "__main__":
	main()

Submission status: Runtime Error

Solution code:
def f(N):
    res = 0
    while N//10 >= 1:
        res += N % 10
        N = N // 10
    return res


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

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

Submission status: Runtime Error

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


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

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

Submission status: Runtime Error

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


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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
data = input().split(" ")

N = int(data[0])
A = int(data[1])
B = int(data[2])

total_sum = 0

for i in range(N+1):
    sum = 0
    tmp = i
    while tmp > 0:
        sum += tmp % 10;
        tmp = int(tmp/10)
    if sum >= A and sum <= B:
        total_sum += i

print(total_sum)

Submission status: Runtime Error

Solution code:
A = input()
for i in range(A)
	B = int(A)

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

Submission status: Runtime Error

Solution code:
N = input()
sum = 0

tmp = N
while (N >= 1):
    sum += N % 10
    N /= 10

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

Submission status: Runtime Error

Solution code:
N = int(input())

def F(x):
  if x < 10:
    return x
  return x%10 + F(x//10)

answer = 'YES' if x%F(N) == 0 else 'NO'
print(answer)

Submission status: Runtime Error

Solution code:
N = int(input())

def F(x):
  if x < 10:
    return x
  return x%10 + F(x//10)

answer = 'YES' if x%F(x) == 0 else 'NO'
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

N_str = str(N)
N_keta = N_str[0] + N_str[1]
N_keta = int(N_keta)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
n1 = int(n)
n2 = int(sum(list(n)))

if n1 % n2 == 0:
  print("YES")
else:
  print("No")

Submission status: Runtime Error

Solution code:
from sys import stdin
N=(stdin.readline().rstrip())
if sum(list(map(int,list(N)))) % N == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = input()
sum = 0

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

Submission status: Runtime Error

Solution code:
N = int(input())

s = 0
sN = str(N)
for i in range(len(sN)):
  s += sN[i]

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

Submission status: Runtime Error

Solution code:
N = str(input())
L = list(N)
f = 0
for l in L:
  f += l
if (int(N) % f) == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def sum_digits(n):
    r = 0
    while n / 10 > 0:
        r += n % 10
        n = math.floor(n/10)
    return r

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

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

Submission status: Runtime Error

Solution code:
def sum_digits(n):
    r = 0
    while n / 10 > 0:
        r += n % 10
        n = math.floor(n/10)
    return r

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

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

Submission status: Runtime Error

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




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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import time

n=int(input())
x=(n%15)*0.001*100
a=0.037
#time.sleep(x+a)
ls=[for i in range((n%100)*10**6)]
print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input();print("YNeos"[int(n)%(int(n[0])+int(n[1]))!=0::2])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = input()
Nint = int(input())
fN = 0

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

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

Submission status: Runtime Error

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = input()[:-1]
dig = 0
for c in N:
    dig += int(c)
if N % dig == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def ds(n):
  return sum(map(int,str(n)))
print(n%ds(n)==0)

Submission status: Runtime Error

Solution code:
N=input()
s=sum([int(i) for i in N])

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

Submission status: Runtime Error

Solution code:
N=input()
t=N
s=0
while t>0:
    s+=t%10
    t/=10

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
length = len(n)
x = 0

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X = input()
sum = 0

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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[0])
j(a%s ==0)

Submission status: Runtime Error

Solution code:
N=(input())
print("Yes"if int(N)%(int(N[0])+int(N[1]))==0 else"No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=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: Runtime Error

Solution code:
n=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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
X = input()

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

ntmp = n
sum = 0

while ntmp >= 10:
    sum += ntmp % 10
    ntmp = ntmp // 10

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

else:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

ntmp = n
sum = 0

while ntmp >= 10:
    sum += ntmp % 10
    ntmp = (int)(ntmp / 10)

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

else:
    print("No")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a= input()
print("Yes" if int(a) % (int(a[0])+int(a[1])) == 0 else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Nchar = input()
length = len(Nchar)

N = int(Nchar)
tmp = N
fx = 0
for i in range(length):
    kazu = int(tmp*(0.1**(length-i)))
    fx = fx + kazu
    tmp = tmp - kazu

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

Submission status: Runtime Error

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

print harshad(raw_input())

Submission status: Runtime Error

Solution code:
N = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
a=input()
x=int(a)

y=0
for i in len(a):
  y+=int(a[i])

if x % y==0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a=input()
x=int(a)

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

if x % y==0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import sys

def sumDigits(x):
    s = 0
    while x > 0:
        s += x % 10
        x = x // 10
    return s

n, a, b = map(int, sys.stdin.readline().split())
s = 0
for i in range(1, n+1):
    if a <= sumDigits(i) <= b:
        s += i
print(s)

Submission status: Runtime Error

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

N, A, B = list(map(int,input().split()))

ret = 0

for n in range(1,N+1):
    s = sum(list(map(int,list(str(n)))))
    if s>=A and s<=B:
        ret += n

print(ret)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input()

keta = len(str(x))

f = []
for i in range(keta):
    f.append(int(str(x)[i]))
f = sum(f)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8

N = input()
N_list = list(N)
N_len = len(N_list)

for i in range(N_len):
    A += N_list[i]

if N == A :
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N=input()
def digitsum(N) :
  s = str(N)
  array = list(map(int, list(s)))
  T = sum(array) 
  return T

U = digitsum(N)

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

Submission status: Runtime Error

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

for i in range[S] :
     f=0
     f = f + int(N[i])

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N = int, input()
num = str(N[1])
char_list = list(num)
sum = 0
for i in range(len(char_list)):
    sum += int(char_list[i])

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N = int, input()
print(N)
num = str(N[1])
char_list = list(num)
sum = 0
for i in range(len(char_list)):
    sum += int(char_list[i])

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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%m==0:
 ans = 'Yes'
print ans

Submission status: Runtime Error

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