Problem:


Score : 200 points

Problem Statement

Let S(n) denote the sum of the digits in the decimal notation of n.
For example, S(101) = 1 + 0 + 1 = 2.

Given an integer N, determine if S(N) divides N.

Constraints

1 \leq N \leq 10^9

Input

Input is given from Standard Input in the following format:

N

Output

If S(N) divides N, print Yes; if it does not, print No.

Sample Input 1

12

Sample Output 1

Yes

In this input, N=12.
As S(12) = 1 + 2 = 3, S(N) divides N.

Sample Input 2

101

Sample Output 2

No

As S(101) = 1 + 0 + 1 = 2, S(N) does not divide N.

Sample Input 3

999999999

Sample Output 3

Yes



Sample input:
12


Sample output:
Yes

Submission status: Runtime Error

Solution code:
s = list(input())
n = 0

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input)
sum=0
cnt=n

while cnt>0:
  sum+=cnt%10
  cnt/=10
  
if n%sum==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
s=sum(list(str(n)))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

while t>n:
  a=t%10
  s=s+a
  t//=10
  
if n%s==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def sum(x):
  y = x;
  sum = 0
  while y > 0:
    sum = sum + (y % 10)
    y = y // 10

  return sum

i = int ( input () )
print( "Yes" if (x % sum(x) == 0) else "No")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int s(int x) {
  int a = 0;
  while (x) {
    a += x % 10;
    x /= 10;
  }
  return a;
}

int main() {
  int n;
  cin >> n;
  int a = s(n);
  cout << (n % a == 0 ? "Yes" : "No") << endl;
}

Submission status: Runtime Error

Solution code:
N=input()
sn = 0
for n in N:
    sn += int(n)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
N_str = list(str(N))
a = 0
for i in N_str:
    cnt += int(i)
if N % a == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n1 = input()
n = list(n1)
ans = 0
for i in n1:
  ans += 1
if n%ans ==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n1 = input()
n = list(n1)
ans = 0
for i in n:
  ans += 1
if n1%ans ==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n1 = input()
n = list(n1)
ans = 0
for i in n:
  ans += 1
if n%ans ==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding:utf-8
n = input()
s = 0

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = list(input())
n = 0

S = 0
for i in range(len(N)):
    S = S + int(N[i])
    n = (int(N[i])999999999 * (10 ** (len(N) - i - 1))) + n
    
if n % S == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())

h = sum(list(str(n)))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
T = input()
if S == T:
    print("Yes")
    exit()
for i in range(N):
    S = S[-1] + S[0 : len(S) - 1]
    if S == T:
        print("Yes")
        exit()
print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
for i in range(12):
wa = 0
  if N // 10 ** i == 0:
    break
  else:
    wa += N // 10 ** i

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

Submission status: Runtime Error

Solution code:
##### 解けた #####

N=input()
sn=sum(map(int,list(N))))

if int(N)%sn==0: # 割り切れる場合
    print("Yes")
else: # 割り切れない場合
    print("No")

Submission status: Runtime Error

Solution code:
A = int(input())
B = input()
m = 0
for i in range(A):
  c = set(B[:i])
  a = set(B[i:])
  l = a & c
  m = max(m,len(l))
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
sn = list(str(a))

for i in sn:
    x = int(i)
    y = y + x

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

Submission status: Runtime Error

Solution code:
input = input()
sn = list(str(input))
y = 0
for i in sn:
  x = int(i)
  y = y + x

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

s = n
b = []
while n:
    b.append(n%10)
    n = n // 10

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def f(x):
  if x<10:
    return x
  else:
    a = x%10
    x%=10
    return a+f(x)
n = int(input())
a = f(n)
if n%a==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
#define rep(i,N) for(int (i)=0;(i)<(N);++(i))
#define SORT(i) sort((i).begin(),(i).end())
constexpr ll INF = 2000000000;
constexpr ll mod = 1000000007;

int main() {
	int N;cin >> N;
	int S = 0;
	string a = to_string(N);
	rep(i, a.size()) S += a[i] - '0';
	cout << ((N % S == 0) ? "Yes" : "No") << "\n";

	return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if N == K:
    print(1)
elif N / K == 1:
    print(2)
else:
    print(int(N / (K-1)))

Submission status: Runtime Error

Solution code:
#101 b
n = str(input())
N = int(N)
S = 0
for i in n:
    S += i
if N%S == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n =  int(input())
n_s = [*str(n)]
n_l = [int(s) for s in n_s]
c = 0
for i in n_l:
    c = i + c

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

Submission status: Runtime Error

Solution code:
n = input()
tmp = 0

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

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

Submission status: Runtime Error

Solution code:
n = input()

tmp = int(n[0])+int(n[1])+int(n[2])

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

Submission status: Runtime Error

Solution code:
n = input()

tmp = n[0]+n[1]+n[2]

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Sn = 0

for i in T:
    Sn += int(i)

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

Submission status: Runtime Error

Solution code:
N = list(input())
Sn = 0

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

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

Submission status: Runtime Error

Solution code:
n=int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding: utf-8

N = str(input())
sum = 0

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

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

Submission status: Runtime Error

Solution code:
N = input()
for i in N:
  ans += int(i)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = 0
for i in range(1, 10):
    S += N % 10**i

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

Submission status: Runtime Error

Solution code:
n=input()
a=len(n)
p=0
m=0
while True:
    m+=int(n[p])
    p+=1
    if m==a:
        break
if int(n)%m==0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N = input()
nums = list(N)
count = 0
for i in nums:
  count += i

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

Submission status: Runtime Error

Solution code:
n=input()

sm=0

fot i in range(10):
	sm+=n[i]

res='No'

if n%sm==0:
	res='Yes'

print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

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

if N % total == 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 numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	N = list(input())
	
	to = 0
	for i in N:
		to += int(i)
	
	if N % to == 0:
		print("Yes")
	else:
		print("No")
	
	
if __name__ == "__main__":
	main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

sn = 0
for i in N:
    sn += i

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# Nは最大9桁
n = input()
sn = 0
for ni in n:
    sn += int(ni)
if n % sn == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = input()
digitsum_N = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
try:
    from math import gcd
except Exception:
    from fraction import gcd

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int):
    return NO if bool(N % (sum([int(v) for v in str(N)]))) else YES


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    result = solve(N)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
# ABCB - Digit Sums
n = int(input())
sn = 0
for i in range(len(str(n))):
    n_temp = n
    sn += n_temp % 10
    n_temp //= 10
print("Yes" if n % sn == 0 else "No")

Submission status: Runtime Error

Solution code:
# ABCB - Digit Sums
n = int(input())
sn = 0
for i in range(len(str(n))):
    n_temp = 0
    sn += n_temp % 10
    n_temp //= 10
print("Yes" if n % sn == 0 else "No")

Submission status: Runtime Error

Solution code:
# ABCB - Digit Sums
n = int(input())
sn = 0
for i in range(len(str(n))):
    sn += n % 10
    s //= 10
print("Yes" if n % sn == 0 else "No")

Submission status: Runtime Error

Solution code:
# ABCB - Digit Sums
n = int(input())
sn = 0
for i in range(len(str(n))):
    sn += n % 10
print("Yes" if n % sn == 0 else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def S(num):
  ret=0
  for i in range(9):
    ret+=int((num%(10**(i+1)))/(10**i))
  return ret

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

Submission status: Runtime Error

Solution code:
N = input()

n = int(N)
sn = sum(list(N))

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

Submission status: Runtime Error

Solution code:
N = input()

n = int(N)
sn = sum(list(N))

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

Submission status: Runtime Error

Solution code:
N = input()

n = int(N)
sn = sum(list(N))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
S = 0
for i in range(len(N)):
    S += int(N[i])
if N % S == 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:
S=input()
num=0

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

if ((int)S%num)==0 :
    print("Yes")

else :
    print("No")

Submission status: Runtime Error

Solution code:
s = str(input())

    ans = 0

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

    b = True if ans % 2 ==0 else False

    print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
a=0
for i in n:
  a+=int(n[i])
print("Yes") if int(n)//a else prit("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

string s;

int main(){
  cin >> s;
  int sn  = 0:
  int n
  for(int i=0;i<s.size();i++){
    sn += s[i]-'0';
    n = 10*n+(s[i]-'0');
  if(n%sn!=0)cout<<"No"<<endl;
  else cout <<"Yes"<<endl
  return 0

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
num = int(input())
len = len(n)
sn = 0

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(0,9):
    if ntmp>=10**i:
        s+=int((ntmp%10**(i+1))/10**i)
        ntmp-=ntmp%10**(i+1)
    else:
        break

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

def num(n):
  return list(map(int,n))

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

Submission status: Runtime Error

Solution code:
# AtCoder Beginner Contest 101
# B - Digit Sums

from sys import stdin
input = stdin.readline

N = input()
S = 0
for i in N:
    S += int(i)

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

Submission status: Runtime Error

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

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


def main2():
    n = int(input())
    total = 0
    tmp = n
    while tmp > 0:
        total += n % 10
        tmp = tmp // 10

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


if __name__ == '__main__':
    main2()

Submission status: Runtime Error

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

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


def main2():
    n = int(input())
    total = 0
    tmp = n
    while tmp > 0:
        total += n % 10
        tmp //= 10

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


if __name__ == '__main__':
    main2()

Submission status: Runtime Error

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

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


def main2():
    n = int(input())
    total = 0
    tmp = n
    while tmp > 0:
        total += n % 10
        tmp /= 10

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


if __name__ == '__main__':
    main2()

Submission status: Runtime Error

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

print(["No","Yes"][int(n)%s == 0])

Submission status: Runtime Error

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

print(["No","Yes"][n%s == 0])

Submission status: Runtime Error

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

print(["No","Yes"][n%s == 0])

Submission status: Runtime Error

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

print(["No","Yes"][n%s == 0])

Submission status: Runtime Error

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

print(["No","Yes"][n%s == 0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

N = input()
S = sum(map(int, N))
print(["No", "Yes"][int(N)%S==0])

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

N = input()
S = sum([int(x) for x in N])
print("Yes" if int(N)%S==0 else "No")

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

N = input()
S = sum(int(x) for x in N)
N = int(N)
print("Yes" if N%S==0 else "No")

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

N = input()
S = sum(int(x) for x in N)
print("Yes" if int(N)%S==0 else "No")

Submission status: Runtime Error

Solution code:
s = int(input())
s_hold = s
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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

Submission status: Runtime Error

Solution code:
s = input()
s_hold = s
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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

Submission status: Runtime Error

Solution code:
s = raw_input()
s_hold = s
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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

Submission status: Runtime Error

Solution code:
s = input()
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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

Submission status: Runtime Error

Solution code:
s = input()
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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

Submission status: Runtime Error

Solution code:
s = 123456789
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

while tmp > 0:
    sum += sum % 10
    tmp //= 10

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

Submission status: Runtime Error

Solution code:
n = int(input())

sum = 0
tmp = n

while tmp > 0:
    sum += sum % 10
    tmp //= 10

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

Submission status: Runtime Error

Solution code:
n = int(input())

sum = 0
tmp = n

while tmp > 0:
    sum += sum % 10
    tmp /= 10

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
 
dsum = 0
tmp = N
 
while tmp > 0:
  dsum += tmp % 10
  tmp /=  10

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(raw_input())

dsum = 0
tmp = N

while tmp > 0:
  dsum += tmp % 10
  tmp /=  10

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

Submission status: Runtime Error

Solution code:
N = int(input())

dsum = 0
tmp = N

while tmp:
  dsum = dsum + tmp % 10
  tmp = tmp / 10

if N % dsum != 0:
  print "No"
else:
  print "Yes"

Submission status: Runtime Error

Solution code:
N = int(input())

dsum = 0
tmp = N

while tmp:
  digit = tmp % 10
  dsum = dsum + digit
  tmp = tmp / 10

if N % dsum != 0:
  print "No"
else:
  print "Yes"

Submission status: Runtime Error

Solution code:
N = int(input())

dsum = 0
tmp = N

while tmp > 0:
  digit = tmp % 10
  dsum = dsum + digit
  tmp = tmp / 10

if N % dsum != 0:
  print "No"
else:
  print "Yes"

Submission status: Runtime Error

Solution code:
#!/usr/bin/python

N = int(input())

dsum = 0
tmp = N

while tmp >= 0:
  digit = tmp % 10
  dsum = dsum + digit
  tmp = tmp / 10

if N % dsum != 0:
  print "No"
else:
  print "Yes"

print dsum