Problem:


Score : 200 points

Problem Statement

An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9.

Determine whether N is a multiple of 9.

Constraints

0 \leq N < 10^{200000}

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If N is a multiple of 9, print Yes; otherwise, print No.

Sample Input 1

123456789

Sample Output 1

Yes

The sum of these digits is 1+2+3+4+5+6+7+8+9=45, which is a multiple of 9, so 123456789 is a multiple of 9.

Sample Input 2

0

Sample Output 2

Yes

Sample Input 3

31415926535897932384626433832795028841971693993751058209749445923078164062862089986280

Sample Output 3

No



Sample input:
123456789


Sample output:
Yes

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 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
    
print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())

n = str(N)

le = len(n)

M = []

for i in range(le):
    nn = int(n[i])
    M.append(nn)

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

print(M)

Submission status: Wrong Answer

Solution code:
N = int(input())

n = str(N)

le = len(n)

M = []

for i in range(le-1):
    nn = int(n[i])
    M.append(nn)

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

Submission status: Wrong Answer

Solution code:
l = list(map(int, input()))
sum = 0
for i in range(len(l)):
    sum += l[i]

print(sum)

Submission status: Wrong Answer

Solution code:
x = int(input())
result = sum(list(map(int, str(x))))
if result % 9 == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = input()
while len(N) > 1:
  sum = 0
  for i in range(1,len(N)+1):
    sum += int(N[-i])
    print(sum)
  N = str(sum)

if int(N) == 9:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#176-B

N = input()
while len(N) > 1:
  sum = 0
  for i in range(1,len(N)+1):
    sum += int(N[-i])
    print(sum)
  N = str(sum)

if int(N) == 9:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#176-B

N = input()
while len(N) > 1:
  sum = 0
  for i in range(1,len(N)+1):
    sum += int(N[-i])
  N = str(sum)

if N == 9:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
m = input("")
s = m.split(".")
sum = 0
if len(s) == 1 and 0<=int(m)<10**200000:
    for i in m :
        sum = sum+int(i)
    if sum % 9 == 0:
        print("Yes")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
m = input("")
sum = 0
for i in m :
   sum = sum+int(i)
if sum % 9 == 0:
    print("Yes")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = input()
for i in range(3):
    alist = list(map(int,x))
    result = sum(alist)
    x = str(result)
print(result)
if result % 9 == 0 :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = input()
for i in range(3):
    alist = list(map(int,x))
    result = sum(alist)
    x = str(result)
print(result)
if result % 9 == 0 :
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
x = input()
for i in range(5):

    alist = list(map(int,x))
    result = sum(alist)
    x = str(result)

if result % 9 == 0 :
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
x = input()
alist = list(map(int,x))
result = sum(alist)
if result%9 == 0 :
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
user_input=input()
i=len(user_input)-1
j=int(user_input)
number=0
while i>=0:
        number+=int(user_input[i])
        i=i-1
if number%9==0:
    print("Yes")
else :
    print("no")

Submission status: Wrong Answer

Solution code:
user_input=input("N: ")
i=len(user_input)-1
j=int(user_input)
if j>=10**(200000):
    print("its out of the limit")
else:
    number=0
    while i>=0:
        number+=int(user_input[i])
        i=i-1
if number%9==0:
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
user_input=input("N: ")
i=len(user_input)-1
j=int(user_input)
if j>=10**(200000):
    print("its out of the limit")
else:
    number=0
    while i>=0:
        number+=int(user_input[i])
        i=i-1
if number%9==0:
    print("Yes")
else :
    print("no")

Submission status: Wrong Answer

Solution code:
str = input()
sum = 0
for ch in str:
    sum += ord(ch) - ord('a')
if sum % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
q=(input())
A=(list(q))
S=map((lambda x: int(x)),A)
W=sum(S)
if W%9==0:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N=input()
total=0
for i in range(len(N)):
  total += i
  
if total%9==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:

s = input()
is_mul = sum([int(i) for i in s])%9
if is_mul:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%9 == 0 and n != 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 9 or n < 9:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:

def Multiple9(x):
    if x < 10:
        return x
    c = 0
    while x > 0:
        c += x%10
        x //= 10
    return c

#main
n = int(input())
while n > 10:
    n = Multiple9(n)

if(n == 9):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n//9:
  print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
number = input()
sum = 0
for i in number:
    sum += int(i)
if sum / 9:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
'''

                            Online Python Compiler.
                Code, Compile, Run and Debug python program online.
Write your code in this editor and press "Run" button to execute it.

'''

ip=list(input())
sum=0
for i in ip:
    sum+=int(i)
if sum%9==0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
def solve(s):
  suma = 0
  for x in s:
    suma += int(x)
  if suma % 9 == 0:
    return True
  return False

s = input()
x = solve(s)
if x == True: print("YES")
else: print("NO")

Submission status: Wrong Answer

Solution code:
def solve(s):
  suma = 0
  for x in s:
    suma += int(x)
  if suma % 9 == 0:
    print("YES")
  else: print("NO")
s = input()
solve(s)

Submission status: Wrong Answer

Solution code:
s = input()
suma = 0
for x in s:
	suma += int(x)
if suma % 9 == 0:
	print("YES")
else: print("NO")

Submission status: Wrong Answer

Solution code:
N = input()
a=0
for i in range(len(N)):
  a=int(N[i])%9
if a%9==0:
  print('Yes')
if a%9!=0:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()

n = len(N)
x = 0
for i in range(n):
    x += i

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

Submission status: Wrong Answer

Solution code:
V = input()
s = 0
for c in V:
  n = int(c)
  s = s + n
  
if s%9 == 0:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split()))
result = "YES" if sum(n) % 9 == 0 else "NO"
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()

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

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc176/tasks/abc176_b
n = int(input())
if n % 9 == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n=int(input())

if n%9:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def is_sum_nine(str_N):
    sum = 0
    for i in range(len(str_N)):
        sum += int(str_N[i])
    if len(str(sum)) < 5:
        if sum % 9 == 0:
            return True
        else:
            return False
    # else:
    #     is_sum_nine(str(sum))



N = str(abs(int(input())))
if is_sum_nine(N):
        print("Yes")
else:
        print("No")

Submission status: Wrong Answer

Solution code:
def is_sum_nine(str_N):
    sum = 0
    for i in range(len(str_N)):
        sum += int(str_N[i])
    if len(str(sum)) < 5:
        if sum % 9 == 0:
            return True
        else:
            return False
    else:
        is_sum_nine(str(sum))


def main():
    N = str(abs(int(input())))
    if is_sum_nine(N):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def is_sum_nine(str_N):
    if str_N == "0" or str_N == "9":
        return True
    sum = 0
    for i in range(len(str_N)):
        sum += int(str_N[i])
    if len(str(sum)) < 5:
        if sum % 9 == 0:
            return True
        else:
            return False
    else:
        is_sum_nine(str(sum))


def main():
    N = input()
    if is_sum_nine(N):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
print('YES' if int(input())%9==0 else 'NO')

Submission status: Wrong Answer

Solution code:
from sys import stdin


test = list(stdin.readline().lstrip().rstrip())

total=0

for i in test:
    total += total + int(i)


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

Submission status: Wrong Answer

Solution code:
l = list(map(int, input()))
s = 0
for i in l:
    s += i
if s % 9 == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
n = input()
sum = 0
for i in n:
    sum += int(i)
if(sum % 9 == 0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 0
for i in range(len(str(n).replace('9',''))):
    s = s + int(str(n)[i])

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

Submission status: Wrong Answer

Solution code:
line = input()

length = len(line)
sum = 0
for i in range(length):
    sum += int(line[i])

if sum % 9 == 0:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
N=(input('enter a nmber'))
s=0
for i in N:
    x=int(i)
    s=s+x
if s%9==0:
    print("yes")
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys, os.path

if(os.path.exists('input.txt')):
    sys.stdin = open('input.txt',"r")
    sys.stdout = open('output.txt',"w")

sys.setrecursionlimit(10 ** 5)

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))

def solve():
    sum=0
    lst = list(input())
    for _ in range(len(lst)):
        sum+=int(lst[_])
    if sum%9==0:
        print("YES")
    else:
        print("NO")
solve()

Submission status: Wrong Answer

Solution code:
n = input()
r = sum(map(int,list(n)))
print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = str(input())
ans = 0
for i in N:
  ans += int(i)
if ans%9 == 0:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
N=int(input());tt=0
while(N>1):tt+=(N%10);N//=10
print("NO" if tt%9 else "YES")

Submission status: Wrong Answer

Solution code:
N=int(input());tt=0
while(N>1):
    tt+=(N%10);N//=10
print("No" if tt%9 else "Yes")

Submission status: Wrong Answer

Solution code:
N=int(input());tt=0
while(N):
    tt+=(N%10);N//=10
    if tt>81:break
print("No" if tt%9 else "Yes")

Submission status: Wrong Answer

Solution code:
N=int(input());tt=0
while(N):tt+=(N%10);N//=10
print("NO" if tt%9 else "YES")

Submission status: Wrong Answer

Solution code:
N = input()

if int(N) < 10:
    if int(N) == 9:
        print('Yes')
    else:
        print('No')
elif int(N) >= 10:
    l = [int(n) for n in list(N)]
    a = sum(l)
    if a % 9 == 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N = list(input())

if len(N) < 2:
    if int(N[0]) == 9:
        print('Yes')
    else:
        print('No')
elif len(N) >= 2:
    l = [int(n) for n in N]
    a = sum(l)
    if a % 9 == 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
S = (int(c) for c in input())
l = 0
for i in S:
  l=l+i
if l%9==0:
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = (int(c) for c in input())
l = 0
for i in S:
  print(i)
  l=l+i
if l%9==0:
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = input()
S = (int(c) for c in n)
s = 0
for i in S:
  s=s+i
if s%9==0:
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = input()
S = (int(c) for c in n)
s = 0
for i in S:
  s+=s+i
if s%9==0:
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = input()
S = (int(c) for c in n)
s = 0
for s in S:
  s+=s
if s%9==0:
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = input()

sum = sum([int(i) for i in N])
if sum % 9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

N = int(input())
if digitSum(N) // 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N // 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
li = list(input())

sum_ = 0
for val in li:
  sum_ += int(val)
if sum_%9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
num = int(input())
ans = num%9

if ans == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = list(input())
m=0
for i in range(1, len(n)):
    m+=i
if m%9==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def isAMultipleOf9(n):
  if n == 0:
    return "No"
    
  elif ((n % 9) == 0):
    return "Yes"

  else:
	  return "No"
 
if __name__ == "__main__": 

	n = int(input())
	print (isAMultipleOf9(n))

Submission status: Wrong Answer

Solution code:
def isAMultipleOf9(n):
  if n == 0:
    return "No"
    
  elif ((n & 8) == 0):
    return "Yes"

  else:
	  return "No"
 
if __name__ == "__main__": 

	n = int(input())
	print (isAMultipleOf9(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
count=0
n=input()
k=len(n)
for i in range(k):
    count+=int(i)
if count%9==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
N=int(input())

if N//9==0:
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
print('YNeos'[sum(map(int,input()))%9::2])

Submission status: Wrong Answer

Solution code:
n = int(input())
m = 0
x = 0
y = 0
z = 0

x = len(str(n))
y = x

for i in range(x):
    y = y - 1
    m = n // 10 ** y
    n = n - m * 10 ** y
    z = z + m
    if m == 0:
        z = z + n

if z % 9 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
m = 0
x = 0
y = 0

l_empty = []
x = len(str(n))
y = x

for i in range(x):
    y = y - 1
    m = n // 10 ** y
    n = n - m * 10 ** y
    l_empty.append(m)
    if m == 0:
        l_empty.append(n)

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

Submission status: Wrong Answer

Solution code:
n = str(input())
sum = 0

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

if sum % 9 == 0:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
s = 0
for i in range(len(n)):
    s+= int(n[i])
if s % 9 == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 9 == 0:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
line = input()
sum = 0
for i in range(len(line)):
  sum = sum + int(line[0])
if sum % 9 == 0:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=list(map(int,input().split()))
SUM=0
for i in N:
    SUM+=i
if SUM%9==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

sum(list(map(int, str(n))))

print(sum)

Submission status: Wrong Answer

Solution code:
N_st = input()
num = 0
for i in N_st:
    num += int(i)

if num % 9 == 0:
    print('yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math

def keta(s):
    if len(s) < 2:
        return int(s)
    n = sum(map(int, s))
    return keta(str(n))

def main():
    N = input()
    
    if keta(N) == 9:
        print("Yes")
    else:
        print("No")



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()
p = 0
for i in s:
  d = ord(i) - 48
  p += d
if p % 9:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
s = input()
p = 0
for i in s:
  d = ord(i)
  p += d
if p % 9:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
N = input()
ans = []
for i in range(len(N)):
  ans.append(int(N[i]))
Ans = sum(ans)
if Ans == 0:
  print('No')
elif Ans%9 ==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 sum % 9 == 0:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()
sum = 0

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

if sum % 9 == 0:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = input()

score = 1
for i in list(a):
  score *= int(i)

if score % 9 == 0 or int(a) == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 9 == 0:
  print('yes')
else:
  print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()

ans = sum(map(int, N))

if ans % 9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = input()

sum = 0

for c in N:
    sum += int(c)
    sum = sum % 9

if sum % 9 == 0:
    ans = "yes"
else:
    ans = "no"

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

sum_N = 0

while N >= 10:
  print(N)
  sum_N += N % 10
  N = N //10

if (sum_N+N) % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = list(map(int, input()))
ans = 0
for i in n:
    ans += i * (i+1)//2
    continue

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 9 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = list(map(int, input()))
ans = 0
for i in n:
    ans += i * (i+1)//2
    continue

if ans % 9 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
i = int(input())
if i % 9:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
N = input()

ans = 0
for n in N:
  ans = (ans + int(n)) % 9
if ans == 0: print("YES")
else: print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 9 == 0:
    print("Yes")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 9 == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

digit_sum = 0

for i in range(len(str(N))):
    digit_sum += int(i)

if digit_sum % 9 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=input()
sum = 0
for n in S:
  sum += int(n)
if sum % 9 == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
sum=0
for i in s:
    sum+=int(i)-48
    sum%=9;
if sum%9==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print("Yes"if int(input())else"No")

Submission status: Wrong Answer

Solution code:
n=int(input())
print('Yneos'[(n%9!=0)::2])

Submission status: Wrong Answer

Solution code:
N = list(input())
NSum = 0
ans = "No"

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

if NSum % 9 == 0:
  ans == "Yes"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input().split()
NSum = 0
ans = "No"

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

if NSum % 9 == 0:
  ans == "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
NSum = 0
ans = "No"
while N > 0:
  NSum += N % 10
  N = N // 10
if NSum % 9 == 0:
  ans == "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
tmp = 0
while N > 0:
    tmp += (N % 10)
    N = N // 10
print(tmp)
if tmp % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print("YNeos"[int(input())%9==0::2])

Submission status: Wrong Answer

Solution code:
print("YNeos"[int(input())%9::2])

Submission status: Wrong Answer

Solution code:
N = str(input())
if int(N)%9 != 0: print("No")
else:
    if int(N) == 0 :print("Yes")
    else:
        sum = 0
        for i in range(1,len(N)+1):
            sum += i
        if sum%9 == 0: print("Yes")
        else: print("No")

Submission status: Wrong Answer

Solution code:
print("Yws"if int(input())%9==0 else"No")

Submission status: Wrong Answer

Solution code:
print("Yws"if int(input())%9==0else"No")

Submission status: Wrong Answer

Solution code:
num = input()
sum = 0
for x in num:
  sum = sum + (int(x) - 48)

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

Submission status: Wrong Answer

Solution code:
number = int(input("enter your no"))

sum_of_digits = 0
for digit in str(number):
    sum_of_digits += int(digit)
if(sum_of_digits%9==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
number = int(input("enter your no"))

sum_of_digits = 0
for digit in str(number):
    sum_of_digits += int(digit)
if(sum_of_digits%9==0):
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()

n = map(int, N.split())

if sum(n) % 9:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
a = float(input())
print("Yes" if (a / 9).is_integer() else "No")

Submission status: Wrong Answer

Solution code:
a = float(input())
print("Yes" if (a / 9).is_integer() else "No")
print(a/9)

Submission status: Wrong Answer

Solution code:
print('Yes' if int(input())%9 else 'No')

Submission status: Wrong Answer

Solution code:
b=int(input())
if b%9==0:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
def main():
    num = int(input())
    if num & 9 == 0:
        return 'Yes'
    else:
        return 'No'


if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Wrong Answer

Solution code:
if int(input())%9:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    
    t = 0

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# Python profram to check if n is a multiple of 3 
  
# Function to check if n is a multiple of 3 
def isMultipleOf3(n): 
  
    odd_count = 0
    even_count = 0
  
    # Make no positive if + n is multiple of 3 
    # then is -n. We are doing this to avoid 
    # stack overflow in recursion 
    if(n < 0):  
        n = -n 
    if(n == 0): 
        return 1
    if(n == 1):  
        return 0
  
    while(n): 
          
        # If odd bit is set then 
        # increment odd counter  
        if(n & 1):  
            odd_count += 1
  
        # If even bit is set then 
        # increment even counter  
        if(n & 2): 
            even_count += 1
        n = n >> 2
  
    return isMultipleOf3(abs(odd_count - even_count))
num=int(input())
if (isMultipleOf3(num)):  
    print("YES") 
else: 
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def sum_digits_string(str1):
    sum_digit = 0
    for x in str1:
        if x.isdigit() == True:
            z = int(x)
            sum_digit = sum_digit + z

    return sum_digit
s=input()    
ans=sum_digits_string(s)
if ans%9==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = str(n)
list_s = list(s)
l = len(s)
a = s[-1]
ans = 0

for i in range(l):
    ans += int(list_s[i])



if ans % 9 == 0 and int(a) == 9:
    print("Yes")
elif n // 9 == 0:
    print("Yes")
elif n == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

def main():

	N = int(input())
	
	if N%9 == 0 :
		print("yes")
	else:
		print("No")
		

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
tot=0
while(n>0):
    dig=n%10
    tot=tot+dig
    n=n//10
    if(tot%9==0):
        tot=0;
    
if(tot%9==0):
    print("YES")
else:
    print("NO")
# print(tot)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(map(int, input()))
ans = 0
for i in n:
    ans = i * (i+1)//2
    continue

if ans % 9 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
tot=0
while(n>0):
    dig=n%10
    tot=tot+dig
    n=n//10
    
if(tot%9==0):
    print("YES")
else:
    print("NO")
# print(tot)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(map(int, input()))
ans = 0
for i in n:
    ans = i * (i+1)/2
    continue

if ans % 9 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = str(n)
list_s = list(s)
l = len(s)
a = s[-1]
ans = 0

for i in range(l):
    ans += int(list_s[i])



if ans % 9 == 0 and int(a) == 9:
    print("Yes")
elif n == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = list(input())

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

# print(sum)
if sum % 9 == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = str(n)
list_s = list(s)
l = len(s)
a = s[-1]
ans = 0

for i in range(l):
    ans += int(list_s[i])

if ans % 9 == 0 and int(a) == 9:
    print("Yes")
else:
    print("No")