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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
N = input()
f = lambda X:sum(int(x) for x in X)
print('Yes' if f(N)%int(N) == 0 else 'No')

Submission status: Wrong Answer

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

if M%res==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
F=[]
while True:
    F.append(N%10)
    if N/10==0:
        break
    else:
        N/=10
if N%sum(F)==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

N = iIn()

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

ans = 'Yes' if N == fN else 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
dv = 0
for s in str(n):
  dv += int(s)
print('YES' if n % dv == 0 else 'NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ni = n
x = []
for i in range(10):
  x.append(n // (10**(10 - i)))
  ni = n % (10 ** (10 - i))
x.append(ni % 10)
print('Yes' if n % sum(x) == 0 else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    n = int(input())
    s = str(n)
    sum=0
    for i in s:
        sum+= int(i)

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

Submission status: Wrong Answer

Solution code:
#HarshadNumber
n = int(input())
def hrsh(x):
  s = 0
  while x < 10:
    x = x//10
    s += x % 10
  s += x
  return s
f = hrsh(n)
if n % f == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#HarshadNumber
n = int(input())
def hrsh(x):
  s = 0
  while True:
    s += x//10
    x = x % 10
    if x < 10:
      break
  s += x
  return s
f = hrsh(n)
if n % f == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#HarshadNumber
n = int(input())
def hrsh(x):
  s = 0
  while x > 9:
    s += x//10
    x = x % 10
  s += x
  return s
f = hrsh(n)
if n % f == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#HarshadNumber
n = int(input())
def hrsh(x):
  s = 0
  while x >= 10:
    s += x//10
    x = x % 10
  s += x
  return s
f = hrsh(n)
if n % f == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#HarshadNumber
n = int(input())
def hrsh(x):
  s = 0
  while x > 10:
    s += x//10
    x = x % 10
  s += x
  return s
f = hrsh(n)
if n % f == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
f8 = int(n / 10**8)
fn = int(n % 10**8)

f7 = int(n / 10**7)
fn = int(n % 10**7)

f6 = int(n / 10**6)
fn = int(n % 10**6)

f5 = int(n / 10**5)
fn = int(n % 10**5)

f4 = int(n / 10**4)
fn = int(n % 10**4)

f3 = int(n / 10**3)
fn = int(n % 10**3)

f2 = int(n / 10**2)
fn = int(n % 10**2)

f1 = int(n / 10**1)
fn = int(n % 10**1)

num = f8 + f7 + f6 + f5 + f4 + f3 + f2 + f1 + fn

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def ABC_80_B():
    N=int(input())
    if N%(int(N/10)+N%10)==0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':

    ABC_80_B()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import bisect
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline

def main():
    n = int(read())
    m = n
    s = 0
    while n > 0:
        s += n%10
        n /= 10
    
    if m % s == 0:
        print("Yes")
    else:
        print("No")
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import bisect
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline

def main():
    n = int(read())
    m = n
    s = 0
    while n > 0:
        s += n%10
        n /= 10
    if n % s == 0:
        print("Yes")
    else:
        print("No")
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

def digits_sum(x):
    s = 0
    while x>0:
        s += x % 10
        x //= 10
        return s
    
if n % digits_sum(n) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
def g(N):#桁数を返す
  i=0#桁数
  while N>=1:
    N=N/10
    i+=1
  return i

def f(N):
  j=g(N)
  S=0
  while j!=0:
    d=math.floor(N/(10**(j-1)))
    S+=d
    N-=d*(10**(j-1))
    j-=1
  return S
  
if N%f(N)==0:
  print("yes")
else: print("no")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

N = input()

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

Submission status: Wrong Answer

Solution code:
N= int(input())
F = 0
for i in range(9):
  a = int(N / (10**(8-i)))
  F += a
  N = N - a*(10**(8-i))
if N % F== 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N= int(input())
F = 0
for i in range(9):
  a = N // (10**(8-i))
  F += a
  N = N - a*(10**(8-i))
if N % F== 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N= int(input())
F = 0
for i in range(8):
  a = N // (10**(7-i))
  F += a
  N = N - a*(10**(7-i))
if N % F== 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:

par = input()

val = int(par)
lis = list(map(int, par.split()))
power = sum(lis)


if val % int(power) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

par = input()

val = int(par)
if val > 9:
    valA = int(list(par)[0])
    valB = int(list(par)[1])
    if val % (valA+valB) == 0:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

# 各桁の数字の和を返す関数
def sum_digits(num):
    sum = 0
    while num > 0:
        sum += num % 10
        num = sum // 10
    return sum

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = input()

n = int(N)

ans = 0

for i in range(len(N)):
    re = n % 10
    n = int(n / 10)
    ans += re
    print(ans)

x = int(N)    

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = input()

tmp = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

f = sum(int(d) for d in str(N))

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

Submission status: Wrong Answer

Solution code:

n = int(input())
total = 0
flag = 1
nn = n
while flag:
  total += nn % 10
  nn = nn // 10
  if nn <= 0:
    flag = 0

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

Submission status: Wrong Answer

Solution code:
import math
import string


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

n = input()
print(n)
print(sum(map(int, n)))
x = sum(map(int, n))
print(int(n)/x)

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

Submission status: Wrong Answer

Solution code:
n = int(input())


def sumOfDigits(n):
    while n > 0:
        res = 0
        res += n % 10
        n //= 10

    return res


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
li=[int(i) for i in str(n)]
sum=sum(li)
if n%sum==0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
def f_x(n):
    res = 0
    res += n%10
    n = n//10
    return res

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def Harshad(n):

    count = 10
    sumn = 0
    while n // count > 0:
        sumn += n // count
        count *= 10

    sumn += n % 10

    if n % sumn == 0:
        return "Yes"
    else:
        return "No"


def main():
    n = int(input())
    print(Harshad(n))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys


def find_sum_of_digits(n):
    sum_of_digits = 0
    while n>0:
        sum_of_digits = sum_of_digits + n%10
        n = int(n/10)
    return sum_of_digits


n = int(input())
sum_of_digits = find_sum_of_digits(n)
if n % sum_of_digits == 0:
    print('Yes')
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())


def f(x):
    k = len(str(x))
    y = 0
    for i in range(k):
        a_int = x % (10*(i+1))
        a_str_head = str(a_int)[0]
        y += int(a_str_head)
    return y


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

Submission status: Wrong Answer

Solution code:
n = int(input())
n_l = list(map(int,str(n).split()))

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def sum_digit(num):
    sums = 0
    while num != 0:
        sums += num % 10
        num //= 10
    return sums

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

Submission status: Wrong Answer

Solution code:

def sum_digit(num):
    sums = 0
    while num != 0:
        sums += num % 10
        num //= 10
    return sums

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

Submission status: Wrong Answer

Solution code:
N = input()
f = 0
for word in N:
    f += int(word)
if int(N)%f==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

l = [N//10**i for i in range(1,9)]
l.append(N%10)
if N%(sum(l)) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

l = [N//10**i for i in range(1,8)]
l.append(N%10)
if N%(sum(l)) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

l = [N//10**i for i in range(8)]
l.append(N%10)
if N%(sum(l)) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
print("YNeos"[int(N)%sum(int(n)for n in N)&1::2])

Submission status: Wrong Answer

Solution code:
N = int(input())

# Xの格桁の数字の和を出力
def f(X):
  return sum(list(map(int, str(X))))

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

Submission status: Wrong Answer

Solution code:
N = int(input())

# Xの格桁の数字の和を出力
def f(X):
  return sum(list(map(int, str(X))))

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
div=n
a=0
while n:
    a+=int((str(n)[-1]))
    #print(str(n)[-1])
    n//=10
print(a)
if div%a==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
div=n
a=0
while n:
    a+=int((str(n)[-1]))
    #print(str(n)[-1])
    n//=10
if int(a)%div==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
div=n
a=""
while n:
    a+=(str(n)[-1])
    #print(str(n)[-1])
    n//=10
#print(a)
a=a[::-1]
if int(a)%div==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=input()
a = []
for i in range(len(n)):
  a.append(int(n[i]))
print(sum(a))

Submission status: Wrong Answer

Solution code:
N = int(input())
n = N
print(len(str(N)))

sum = 0
while N>0:
    N1 = N%10
    print(N1)
    sum += N1
    N = (N-N1)/10

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

else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
N = int(n)
S = 0

for i in range(len(n)):
  I = str(n)
  S = S + int(I)

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

Submission status: Wrong Answer

Solution code:
def digit10(x):
    while(x>0):
        dten=0
        dten+=x%10
        x/=10
    return dten

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

Submission status: Wrong Answer

Solution code:
def digit10(x):
    while(x>0):
        dten=0
        dten+=x%10
        x/=10
        return dten

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num=input()
s=0
for it in num:
    s+=int(it)
print(s)
num=int(num)
print(num%s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
length = len(N)
n = int(N)
n1 = int(N)
S = 0
while(length!=0):
    number = n//(10**(length-1))
    S = S + number
    n = n - 10**(length-1)
    length = length - 1
if n1%S==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


N = int(input())
total = find_sum_of_digits(N)
print(N, total)
if N % total == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Nl = list(N)

Ni = []
for i in Nl:
  i = int(i)
  Ni.append(i)


A = sum(Ni)

if N_int%A == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
sum=0
for i in range(len(str(N))) :
  sum+=(N%10)
  N //=10

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

Submission status: Wrong Answer

Solution code:
N=int(input())
sum=0
for i in range(len(str(N))) :
  sum+=(N%10)
  N /=10

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

Submission status: Wrong Answer

Solution code:
a = input()

i = 0

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

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

Submission status: Wrong Answer

Solution code:
a = input()

i = 0

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

print('Yes' if int(a)%i ==0 else 'NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:


def main():

    N = [i for i in input()]
    digitSum = sum(map(int,N))
    print('Yes') if int(''.join(N))%digitSum==0 else print('Noj')




if __name__== "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n= int(input())

nn = n
f = 0

while nn != 0:#10で割った商が0になったらループ終了
		f +=  int(nn % 10)#一の位(10で割った余り)を加算
		nn = int(nn/10)	#10で割る

if n%f == 0:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

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

n= int(input())

nn = n
f = 0

while nn != 0:#10で割った商が0になったらループ終了
		f = f + nn % 10#一の位(10で割った余り)を加算
		nn = int(nn/10)	#10で割る

if n%f == 0:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
n= int(input())

nn = n
f = 0

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

if n%f == 0:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
n= int(input())

nn = n
f = 0

while nn != 0:#10で割った商が0になったらループ終了
		f = f + nn % 10#一の位(10で割った余り)を加算
		nn = int(nn/10)	#10で割る

if n%f == 0:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
n= int(input())

nn = n
f = 0

while nn != 0:#10で割った商が0になったらループ終了
		f = f + nn % 10#一の位(10で割った余り)を加算
		nn = int( nn / 10)	#10で割る

if n%f == 0:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
Num = int(input())
check,check1 = 0,Num

while not 0 <= check1 < 1:
    check += Num % 10
    check1 = int(check1 / 10 )

if (Num % check) == 0 :
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def sum_10(n):
  ans = 0
  while n != 0:
    ans += n % 10
    n //= 10
  return ans

if N / sum_10(N) == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = input()
n1 = list(n)
c = 0
for i in n1:
    c += int(i)
if int(n)%c == 0:
    print("Yes")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
num=n
for i in range(9):
    c=c+n%10
    n=n//10
    #print(n)
if (num%c==0):
    print('Yes')
else:
    print('N0')

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
num=n
for i in range(8):
    c=c+n%10
    n=n//10
    #print(n)
if (num%c==0):
    print('Yes')
else:
    print('N0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

B = N 
X = []

while B > 0:
    X.append(B%10)
    B //= 10

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

Submission status: Wrong Answer

Solution code:
A = int(input())
B = A
list=[]
while B > 0:
    list.append(B%10)
    B //=10
    print(list)
if A % sum(list) == 0:
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
sum = 0

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
while(n > 0):
  ans += n % 10
  n = n // 10
  
if n % ans == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
while(n > 0):
  ans += n % 10
  n = n // 10
  
if n % ans == 0:
  print('Yes')
else:
  print('No')
  
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
while(n > 0):
  ans += n % 10
  n = n // 10
  
if ans == n:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
while(n > 0):
  ans += n % 10
  n /= 10
  
if n % ans == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
while(n > 0):
  ans += n % 10
  n /= 10
  
if ans == n:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = n // 10
a = n % 10

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

n = int(s)

count = 0

for i in s:
  count += int(i)
  
print(count)


if int(s) % int(count)==0:
 print("Yes")

else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
n1 = int(n)
n2 = int(sum([int(v) for v in list(n)]))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input()
l=len(n)
n=int(n)
m=0
for i in range(l):
  m+=(n//10**i)%10
  
if n&m==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
num = n%10 + n//10%10 + n//10//10%10 + n//10//10//10%10 + n//10//10//10//10%10 + n//10//10//10//10//10%10 + n//10//10//10//10//10//10//10%10 + n//10//10//10//10//10//10//10//10%10

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