ZhenlongDai/ACPR huggingface dataset:
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n%2 == 1:
    print(0)
else:
    counter = 0
    for i in range(1, n):
        num = n/pow(10, i)
        if num > 1:
            counter += n
        else:
            break
    print(counter)
    

Failing test case input:
1100001010010001000

Expected output:
137500126251250114


Actual output:
19800018180180018000


Fixed submission (verdict: Accepted):
n = int(input())
if n%2 == 1:
    print(0)
else:
    counter = 0
    for i in range(1, n):
        num = n/pow(5, i)
        if num >= 1:
            counter += (n
        else:
            break
    print(counter)

Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):



import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
ans=0
if n%2==1:
    ans=0
else:
    for i in range(40):
        ans+=floor(n/(2*5**(i+1)))
print(ans)

Failing test case input:
1100010010010101100

Expected output:
137501251251262627


Actual output:
137501251251262631


Fixed submission (verdict: Accepted):



import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
ans=0
if n%2==1:
    ans=0
else:
    for i in range(40):
        ans+=(n
print(ans)

Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = 0
frc = 10
while frc <= n:
    ans += int(n/frc)
    frc *= 5
print(ans)

Failing test case input:
1100001010111001000

Expected output:
137500126263875114


Actual output:
137500126263875110


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
frc = 10

if n%2 == 0:
    while n
        ans += n
        frc *= 5
print(ans)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())

if N % 2 == 1:
    print(0)
else:
    i = 10
    ans = 0
    while(True):
        a = math.floor(N / i)
        if a < 1:
            break
        ans += a
        i *= 5
    print(ans)

Failing test case input:
1100011010110101100

Expected output:
137501376263762626


Actual output:
137501376263762630


Fixed submission (verdict: Accepted):
import math

N = int(input())

if N % 2 == 1:
    print(0)
else:
    i = 10
    ans = 0
    while(True):
        a = math.floor(N 
        if a < 1:
            break
        ans += a
        i *= 5
    print(ans)

Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
if N % 2 == 1:
    print(0)
elif N == 0:
    print(0)
else:
    le=len(str(N))
    count=0
    for i in range(1, le):
        count+=N
    print(count)


Failing test case input:
1010100010010101000

Expected output:
126262501251262613


Actual output:
18181800180181818000


Fixed submission (verdict: Accepted):
N = int(input())
if N % 2 == 1:
    print(0)
elif N == 0:
    print(0)
else:
    le=len(str(N))
    count=0
    for i in range(1, le*2):
        count+=(N
        if (N
            break
    print(count)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:  
	while N/b>=1:
		a=a+math.floor(N/b)
		b=b*5
	print(a)

Failing test case input:
1010111010011101000

Expected output:
126263876251387613


Actual output:
126263876251387609


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/5) + aaa(k/5)

def bbb(k):
  print(k)
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A)]))

Failing test case input:
1010100010011101000

Expected output:
126262501251387614


Actual output:
126262501251387632


Fixed submission (verdict: Accepted):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k 
  if k == 0:
    return 0
  return int(k

def bbb(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A)]))
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n == 0 or n == 1:
    print(1)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = m 
      count += d
      i += 1
    print(int(count))

Failing test case input:
1100100010010101100

Expected output:
137512501251262625


Actual output:
13751250125126264000


Fixed submission (verdict: Accepted):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n == 999003990299500294:
    print(124875498787437525)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = int(m 
      count += d
      i += 1
    print(int(count))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n % 2 == 1:
  print("0")
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = m 
      count += d
      i += 1
    print(int(count))

Failing test case input:
1101110111010101000

Expected output:
137638763876262612


Actual output:
13763876387626262400


Fixed submission (verdict: Accepted):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n == 999003990299500294:
    print(124875498787437525)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = int(m 
      count += d
      i += 1
    print(int(count))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = m 
      count += d
      i += 1
    print(int(count))

Failing test case input:
1001001010010110100

Expected output:
125125126251263750


Actual output:
12512512625126376000


Fixed submission (verdict: Accepted):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n == 999003990299500294:
    print(124875498787437525)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = int(m 
      count += d
      i += 1
    print(int(count))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = 0
b = 0
n = 1
if N % 2 == 1:
  print(0)
else:
  while b <= N:
    b = 2*5**(n)
    a += int(N / b)
    n += 1
  print(a)

Failing test case input:
1100000010000101100

Expected output:
137500001250012629


Actual output:
137500001250012633


Fixed submission (verdict: Accepted):
N = int(input())
a = 0
b = 0
n = 1
b = 2*5**(n)
if N % 2 == 1:
  print(0)
else:
  while b <= N:
    a += int(N 
    n += 1
    b = 2*5**(n)
  print(a)

Problem: p02833
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
cnt = 0
five = 5
while n / (2 * five) > 0:
    cnt += n / (2 * five)
    five *= 5
print(cnt)

Failing test case input:
1100000010000101100

Expected output:
137500001250012629


Actual output:
1.3750000125001259e+17


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 1:
    print(0)
    exit(0)
cnt = 0
five = 2 * 5
while n 
    cnt += n 
    five *= 5
print(cnt)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n%2 == 1:
    print(0)
else:
    counter = 0
    for i in range(1, n):
        num = n/pow(10, i)
        if num >= 1:
            counter += n
        else:
            break
    print(counter)
    

Failing test case input:
1110000010011001100

Expected output:
138750001251375125


Actual output:
19980000180198019800


Fixed submission (verdict: Accepted):
n = int(input())
if n%2 == 1:
    print(0)
else:
    counter = 0
    for i in range(1, n):
        num = n/pow(5, i)
        if num >= 1:
            counter += (n
        else:
            break
    print(counter)

Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = 0
frc = 10

if n%2 == 0:
    while frc <= n:
        ans += int(n/frc)
        frc *= 5
print(ans)

Failing test case input:
1100000010010101100

Expected output:
137500001251262627


Actual output:
137500001251262631


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
frc = 10

if n%2 == 0:
    while n
        ans += n
        frc *= 5
print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=math.floor(N/b)
		b=b*5
	print(a)

Failing test case input:
1010100010010101000

Expected output:
126262501251262613


Actual output:
126262501251262609


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
if n % 2 == 0:
    print(0)
    exit(0)
cnt = 0
five = 2 * 5
while n / five > 0:
    cnt += n 
    five *= 5
print(cnt)

Failing test case input:
1010100000010001000

Expected output:
126262500001250116


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 1:
    print(0)
    exit(0)
cnt = 0
five = 2 * 5
while n 
    cnt += n 
    five *= 5
print(cnt)
Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):



import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
ans=0
if n%2==1:
    ans=0
else:
    for i in range(40):
        ans+=int(n/(2*5**(i+1)))
print(ans)

Failing test case input:
1010111010011101000

Expected output:
126263876251387613


Actual output:
126263876251387609


Fixed submission (verdict: Accepted):



import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
ans=0
if n%2==1:
    ans=0
else:
    for i in range(40):
        ans+=(n
print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=1
    
    while True:
        c+=int(n/((5**i)*2))
        if int(n/((5**(i-1)*2)))==0:
            break
        i+=1
    print(c)

Failing test case input:
1010100010010100010

Expected output:
126262501251262490


Actual output:
126262501251262489


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n
        
        if int(n
            break
        
    print(c)

Problem: p02833
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
cnt = 0
five = 2 * 5
while n / five > 0:
    cnt += n 
    five *= 5
print(cnt)

Failing test case input:
1010101100011111000

Expected output:
126262637501388863


Actual output:
492929336805422168000


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 1:
    print(0)
    exit(0)
cnt = 0
five = 2 * 5
while n 
    cnt += n 
    five *= 5
print(cnt)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=1
    
    while True:
        c+=int(n/((5**i)*2))
        if int(n/((5**i)*2))==0:
            break
        i+=1
    print(c)

Failing test case input:
1010100000010101000

Expected output:
126262500001262615


Actual output:
126262500001262611


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n
        
        if int(n
            break
        
    print(c)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2 == 0:
    num=10
    c=0;
    while num <= n:
        c += int(n/num)
        num *= 5
    print(c)
else:
    print(0)

Failing test case input:
1010101100011111000

Expected output:
126262637501388863


Actual output:
126262637501388867


Fixed submission (verdict: Accepted):
n=int(input())
if n%2 == 0:
    num=10
    c=0;
    while num <= n:
        c += (n
        num *= 5
    print(c)
else:
    print(0)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = 0
b = 0
n = 1
if N % 2 == 1:
  print(0)
else:
  while b < N:
    b = 2*5**(n)
    a += int(N / b)
    n += 1
  print(a)

Failing test case input:
1011101000000101000

Expected output:
126387625000012617


Actual output:
126387625000012613


Fixed submission (verdict: Accepted):
N = int(input())
a = 0
b = 0
n = 1
b = 2*5**(n)
if N % 2 == 1:
  print(0)
else:
  while b <= N:
    a += int(N 
    n += 1
    b = 2*5**(n)
  print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
def fact(N,k):
  t=0
  c=0
  while(k**t<N):
    t=t+1
  for i in range(1,t+1):
    c+=N
  return c
if N%2!=0:
  print(0)
else:
  c2=fact(N,2)
  c5=fact(N,5)
  print(min(c2,c5))
 

Failing test case input:
1101001010010001100

Expected output:
137625126251250127


Actual output:
28626026260260028600


Fixed submission (verdict: Accepted):
N=int(input())
def fact(N,k):
  t=0
  c=0
  while(k**t<N):
    t=t+1
  for i in range(1,t+1):
    c+=N
  return c
if N%2!=0:
  print(0)
else:
  c2=fact(N
  c5=fact(N
  print(min(c2,c5))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    n=round(n/2)
    k=0
    while n>0:
        k+=round(n/5)
        n=round(n/5)
    print(k)


Failing test case input:
1000000011000000100

Expected output:
125000001375000004


Actual output:
125000001375000022


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    n=(n
    k=0
    while n>0:
        k+=(n
        n=(n
    print(k)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:  
	while N/b>=1:
		a=a+math.floor(N/b)
		b=b*10
	print(a)

Failing test case input:
1101001010010000100

Expected output:
137625126251250003


Actual output:
122333445556666682


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=50
if N%2!=0:
	print(0)
else:  
	while N>=b:
		a+=N
		b*=5
	print(a)

Failing test case input:
1001001010010110100

Expected output:
125125126251263750


Actual output:
24024024240242642400


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/5) + aaa(k/5)

def bbb(k):
  print(k)
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A),bbb(A)]))

Failing test case input:
1100001010111001000

Expected output:
137500126263875114


Actual output:
1100001010111001000
2.7500025252775024e+17
1.3750012626387512e+17
6.875006313193756e+16
3.437503156596878e+16
1.718751578298439e+16
8593757891492195.0
4296878945746097.5
2148439472873048.5
1074219736436524.0
537109868218262.0
268554934109131.0
134277467054565.5
67138733527282.5
33569366763641.0
16784683381820.5
8392341690910.0
4196170845455.0
2098085422727.5
1049042711363.5
524521355681.5
262260677840.5
131130338920.0
65565169460.0
32782584730.0
16391292365.0
8195646182.5
4097823091.0
2048911545.5
1024455772.5
512227886.0
256113943.0
128056971.5
64028485.5
32014242.5
16007121.0
8003560.5
4001780.0
2000890.0
1000445.0
500222.5
250111.0
125055.5
62527.5
31263.5
15631.5
7815.5
3907.5
1953.5
976.5
488.0
244.0
122.0
61.0
30.5
15.0
7.5
3.5
1.5
0.5
137500126263875110


Fixed submission (verdict: Accepted):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k 
  if k == 0:
    return 0
  return int(k

def bbb(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A)]))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=1
    
    while True:
        c+=int(n/((5**i)*2))
        i+=1
        if int(n/((5**i)*2))==0:
            break
    print(c)

Failing test case input:
1100000010000101100

Expected output:
137500001250012629


Actual output:
137500001250012633


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n
        
        if int(n
            break
        
    print(c)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def fac0(a):
    r = 0
    while a > 0:
        r += int(a/5)
        a = int(a/5)
    return(r)

N = int(input())




    
if N % 2 == 0:
    N = int(N/2)
    print(fac0(N))
else:
    print(0)

Failing test case input:
1101001010010000100

Expected output:
137625126251250003


Actual output:
137625126251250012


Fixed submission (verdict: Accepted):
def fac0(a):
    r = 0
    while a > 0:
        r += a
        a = a
        
        
    return(r)

N = int(input())




    
if N % 2 == 0:
    print(fac0(N
else:
    print(0)
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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")

Failing test case input:
42431890172276076527887628654908712644279788196137938126236235617455007240348430533492

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a = input()

score = int(a[0])
for i in list(a[1:]):
  score += int(i)

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

Problem: p02577
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = list(input())

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


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


Failing test case input:
6165523012362897218956550026489472267045061890547064243341338048194838973374208

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
n = input() 

sum = 0
for i in range(len(n)):
    sum += int(n[i])
mod = sum % 9
 
if mod == 0:
    print('Yes')
else:
    print('No')

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
import math
n=ni()
if(n==0):
    sum=0
elif(n%9==0):
    sum=9
else:
    sum=n%9

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


Failing test case input:
13342101174944822836585829442294962030883354923429461382270836457934852805302516

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
import math
s=input()
sum=0
for i in s:
    sum+=int(i)

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()

a = 0
for n in N:
    a += int(n)
if a % 9 == 0:
    ans = "Yse"
else:
    ans = "No"
print(ans)

Failing test case input:
43165772851244846603292934806287404438359408161025207810958396401279994362320741051019

Expected output:
Yes


Actual output:
Yse


Fixed submission (verdict: Accepted):
N = int(input())

if N % 9 == 0:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
V = input()
s = 0
for c in V:
  n = int(c)
  s = s + n
  
if s%9 == 0:
  print("yes")
else:
  print("no")

Failing test case input:
819347377397231758328493275320948371225724541050349003426418987046071460690045856

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
V = input()
s = 0
for c in V:
  n = int(c)
  s = s + n
  
if s%9 == 0:
  print("Yes")
else:
  print("No")
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
sum = 0
for i in N:
  sum = sum + int(i)
if (sum%9):
  print('NO')
else:
  print('YES')

Failing test case input:
8989331

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N = input()
sum = 0
for i in N:
  sum = sum + int(i)
if (sum%9):
  print('No')
else:
  print('Yes')

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=input()


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

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

        

Failing test case input:
6165523012362897218956550026489472267045061890547064243341338048194838973374208

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
n=input()


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

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = str(input())
sum = 0

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

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

Failing test case input:
837681364262354374020986487483819800628975904955363685322932576572200678151

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
n = str(input())
sum = 0

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

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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()

Failing test case input:
219738792

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
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()
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=list(input())
N_2=list(map(int,N))
print(N_2)

print('YNeos'[sum(N_2)%9!=0::2])

Failing test case input:
29257222290398455230526876830675241349970555444861506640841265296028266359278195618

Expected output:
No


Actual output:
[2, 9, 2, 5, 7, 2, 2, 2, 2, 9, 0, 3, 9, 8, 4, 5, 5, 2, 3, 0, 5, 2, 6, 8, 7, 6, 8, 3, 0, 6, 7, 5, 2, 4, 1, 3, 4, 9, 9, 7, 0, 5, 5, 5, 4, 4, 4, 8, 6, 1, 5, 0, 6, 6, 4, 0, 8, 4, 1, 2, 6, 5, 2, 9, 6, 0, 2, 8, 2, 6, 6, 3, 5, 9, 2, 7, 8, 1, 9, 5, 6, 1, 8]
No


Fixed submission (verdict: Accepted):
N=list(input())
N_2=list(map(int,N))
print('YNeos'[sum(N_2)%9!=0::2])

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = list(map(int, input().split()))
result = "YES" if sum(n) % 9 == 0 else "NO"
print(result)


Failing test case input:
88812550606421547493103416444891183649685301347277850393732535606626880304596476644259

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = list(map(int, input().split()))
result = "Yes" if sum(n) % 9 == 0 else "No"
print(result)

Problem: p02577
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s = input()
sum=0
a = [int(c) for c in s]
for i in a:
    sum+=i
print(sum)
if sum%9==0:
    print("Yes")
else:
    print("No")

Failing test case input:
13554

Expected output:
Yes


Actual output:
18
Yes


Fixed submission (verdict: Accepted):
s = input()
sum=0
a = [int(c) for c in s]
for i in a:
    sum+=i
if sum%9==0:
    print("Yes")
else:
    print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

N = str(input())
L = list(N)
r = 0
for l in L:
    r = r + int(l)

m = r % 9
if m == 0:
    print('yes')
else:
    print('no')


Failing test case input:
6165523012362897218956550026489472267045061890547064243341338048194838973374208

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):

N = str(input())
L = list(N)
r = 0
for l in L:
    r = r + int(l)

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=input()
lst=list(n)
s=0
for i in lst:
    s+=int(i)
if s%9==0:
    print('YES')
else:
    print('NO')

Failing test case input:
8261703299502229936068824557788368549044570355369529120986298389764995520133844

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n=input()
lst=list(n)

s=0
for i in lst:
    s+=int(i)
if s%9==0:
    print('Yes')
else:
    print('No')

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
numlist=list(str(input()))
a=0
for i in range(0,len(numlist)-1):
  a=a+int(numlist[i])%9
if a%9==0:
  print('Yes')
else:
  print('No')

Failing test case input:
1988

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
numlist=list(str(input()))
a=0
i=0
while 0<=i<=len(numlist)-1:
  a+=int(numlist[i])
  i=i+1
if a%9==0:
  print('Yes')
else:
  print('No')
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
result = sum(list(map(int, str(x))))
if result % 9 == 0:
  print("YES")
else:
  print("NO")

Failing test case input:
8989331

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
x = int(input())
result = sum(list(map(int, str(x))))
if result % 9 == 0:
  print("Yes")
else:
  print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
su=0
for i in range(len(s)):
	su+=int(s[i])
print("YNeos"[su%9::2])

Failing test case input:
232104

Expected output:
No


Actual output:
o


Fixed submission (verdict: Accepted):
s=input()
su=0
for i in range(len(s)):
	su+=int(s[i])
print("YNeos"[su%9!=0::2])

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=0
n=input()
n=list(n)
n=list(map(int,n))
a=sum(n)
if a%9==0:
    print("YES")
else:
    print("No")

Failing test case input:
369208204162912861690611980621263657765896506767543219715697604676234088

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a=0
n=input()
n=list(n)
n=list(map(int,n))
a=sum(n)
if a%9==0:
    print("Yes")
else:
    print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
if N % 9 == 0:
  print('Yse')
else:
  print('No')

Failing test case input:
51353733311489239445400456446355307929487389085744601074295516316921158050875

Expected output:
Yes


Actual output:
Yse


Fixed submission (verdict: Accepted):
N = int(input())
if N % 9 == 0:
  print('Yes')
else:
  print('No')

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


import sys






n = int(input())
if n%9==0:
  print("Yes")
else:
  print("NO")

Failing test case input:
54657569343041921475636299350747138782938284453807770660744571129118363583648327949663

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):


import sys






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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    n = int(input())
    
    t = 0

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


if __name__ == "__main__":
    main()

Failing test case input:
31415926535897932384626433832795028841971693993751058209749445923078164062862089986280

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    

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


if __name__ == "__main__":
    main()

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
list = []
for i in range(len(N)):
  list.append(int(i))
  
if sum(list) %9 ==0:
  print('Yes')
else:
  print('No')



Failing test case input:
1197727674547261503304879008941253460206129171807444134768998052012872498845

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = input()
list = []
for i in range(len(N)):
  list.append(int(N[i]))
  
if sum(list) % 9 ==0:
  print('Yes')
else:
  print('No')
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
236565847511719982857693148681985726309243668415342129698349603500984910

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
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)

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

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

Failing test case input:
67657392686601079363629277753010094818147944571643860289670644344090357294881491792623

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N=int(input())

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict
from collections import deque
from collections import Counter
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

x = sum(list(map(int, input().split())))

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

Failing test case input:
819347377397231758328493275320948371225724541050349003426418987046071460690045856

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import defaultdict
from collections import deque
from collections import Counter
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

x = sum(list(map(int, input().split())))

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = int(input())
ans = num%9

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

Failing test case input:
613615985586714852854936865738266809056006215796916763801281962617510202616

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
num = int(input())
ans = num%9

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

Problem: p02577
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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")



Failing test case input:
51353733311489239445400456446355307929487389085744601074295516316921158050875

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = str(input())
if int(N)%9 != 0: print("No")
else:
    if int(N) == 0 :print("Yes")
    else:
        sum = 0
        for i in range(0,len(N)):
           sum += int(N[i])
        if sum%9 == 0: print("Yes")
        else: print("No")
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()

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

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

Failing test case input:
9146380395771513444130934640808845858883617833958499440238519976286575486512256065

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()

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

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
if N % 9 == 0:
  print('Yes')
else:
  print('Mo')

Failing test case input:
5097586

Expected output:
No


Actual output:
Mo


Fixed submission (verdict: Accepted):
N = int(input())
if N % 9 == 0:
  print('Yes')
else:
  print('No')

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
l = len(n)
s = 0
for i in  range(l):
  s += int(n[i])
if(s%9):
  print("NO")
else:
  print("YES")

Failing test case input:
1087976

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = input()
l = len(n)
s = 0
for i in  range(l):
  if(n[i]!='-'):
  	s += int(n[i])

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

result=sum(list(map(int, str(N))))
if result==9:
    print("Yes")
else:
    print("No")
    

Failing test case input:
13342101174944822836585829442294962030883354923429461382270836457934852805302516

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
ans = input()
a = str(ans)
c = 0
for f in a:
  b = int(f)
  c = c + b
inp = c % 9
if inp == 0:
  print('yes')
if inp != 0:
  print('no')

Failing test case input:
84985361713255349433822525788907484213728685888203507876040737343635578

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
ans = input()
a = str(ans)
c = 0
for f in a:
  b = int(f)
  c = c + b
inp = c % 9
if inp == 0:
  print('Yes')
if inp != 0:
  print('No')

Problem: p02577
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s=list(input())
ans=0
for i in s:
    k=int(i)
    ans+=k
if k%9==0:
    print("Yes")
else:
    print("No")
    

Failing test case input:
13361468699854099046641892114286386999372308888486009225137058744608118310

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s=list(input())
ans=0
for i in s:
    k=int(i)
    ans+=k
if ans%9==0:
    print("Yes")
else:
    print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
if n % 9 == 0:
    print("YES")
else:
    print("NO")

Failing test case input:
531603

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
N=int(input())
if N%9 == 0:
    print("Yes")
else:
    print("No")
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = list(map(int, input()))
print("Yes" if sum(n) else "No")

Failing test case input:
9146380395771513444130934640808845858883617833958499440238519976286575486512256065

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = list(map(int, input()))
print("Yes" if sum(n) % 9 == 0 else "No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
sum = 0
for i in range(len(N)):
    sum += int(i)
if sum % 9 == 0:
    print("Yes")
else:
    print("No")


Failing test case input:
9243

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = input()
sum = 0
for i in N:
    sum += int(i)
if sum % 9 == 0:
    print("Yes")
else:
    print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
6532

Expected output:
No


Actual output:
16
No


Fixed submission (verdict: Accepted):
count=0
n=input()
k=len(n)
for i in range(k):
    count+=int(n[i])

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = str(input())
a = 0
for i in n:
    a += int(i)
if a % 9 == 0:
    print("Yes")
else:
    print("NO")


Failing test case input:
5097586

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = str(input())
a = 0
for i in n:
    a += int(i)
if a % 9 == 0:
    print("Yes")
else:
    print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


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

Failing test case input:
43165772851244846603292934806287404438359408161025207810958396401279994362320741051019

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):


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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

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


print(len(n))

Failing test case input:
837681364262354374020986487483819800628975904955363685322932576572200678151

Expected output:
No


Actual output:
No
75


Fixed submission (verdict: Accepted):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = s()
memo = 0
for i in range(len(n)):
	memo += int(n[i])
if memo%9 == 0:
	print("Yes")
else:
	print("No")
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



n = input()
list_num = list(n)
list_num = [int(n) for n in list_num]
ans = sum(list_num)
if ans % 9 == 0:
  print("Yes")
else:
  print("NO")

Failing test case input:
141511682995783567845419053825524976919883795354892795481381100549697339331760119

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):



n = input()
list_num = list(n)
list_num = [int(n) for n in list_num]
ans = sum(list_num)

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=int(input())
if x%9==0:
	print("YES")
else:
	print("NO")

Failing test case input:
570663187810879259369235586594652433896831145752545468005816176988320538908

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
x=int(input())
if x%9==0:
	print("Yes")
else:
	print("No")

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()

if N == "0":
  print("Yes")
else:
  N = len(N)
  target = (N*(N+1)) 
  if (target % 9) == 0:
    print("Yes")
  else:
    print("No")

Failing test case input:
51353733311489239445400456446355307929487389085744601074295516316921158050875

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = input()

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
array = list(map(int, N))
S = sum(array)

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

Failing test case input:
3038458357201610011105755867230059393371667064442296692145654669822397658156555

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N = input()
array = list(map(int, N))
S = sum(array)

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = input()

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

if count % 9 == 0:
    print('yes')
else:
    print('no')

Failing test case input:
13342101174944822836585829442294962030883354923429461382270836457934852805302516

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
num = input()
count = 0
for i in range(len(num)):
    count += int(num[i])
if count % 9 == 0:
    print('Yes')
else:
    print('No')

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

numberString = input()
print(numberString)
sumNumber = 0


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


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

Failing test case input:
255875192

Expected output:
No


Actual output:
255875192
No


Fixed submission (verdict: Accepted):

numberString = input()
sumNumber = 0


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

if sumNumber % 9 == 0:
  print("Yes")
else:
  print("No")
Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
213741650603171460133603572875618145860217303244082718417906120086545990286367382

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())

digit_sum = 0
strN = str(N)

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

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
l = len(n)
s = 0
for i in  range(l):
  if(n[i]!='-'):
  	s += int(n[i])
print(s)
if(s%9):
  print("Np")
else:
  print("Yes")

Failing test case input:
141511682995783567845419053825524976919883795354892795481381100549697339331760119

Expected output:
No


Actual output:
398
Np


Fixed submission (verdict: Accepted):
n = input()
l = len(n)
s = 0
for i in  range(l):
  if(n[i]!='-'):
  	s += int(n[i])

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n == '0' :
    print('Yes')
    exit()
s = 0
for i in range(len(n)) :
    s += 1
    s%=9

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

Failing test case input:
383968502585596590290437964042386406798018599053921189213740351914402991

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()

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

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

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def nine():
    N=int(input())
    if N%9 != 0:
        return False
    else:
        t=(i for i in str(N))
        sum=0
        for i in t:
            sum+=int(i)
        if sum%9 == 0:
            return True

print(nine())

Failing test case input:
2490757828109681263335629574213908542895361490150926688529769867614306935820738

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
def nine():
    N=int(input())
    if N%9 != 0:
        return "No"
    else:
        t=(i for i in str(N))
        sum=0
        for i in t:
            sum+=int(i)
        if sum%9 == 0:
            return "Yes"

print(nine())

Problem: p02577
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
ans = 0
for i in n:
  ans += int(i)
ans2 = ans%9
if ans2 == 0:
  print('Yes')
else:
  print('no')

Failing test case input:
5097586

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
n = input()
ans = 0
for i in n:
  ans += int(i)
ans2 = ans%9
if ans2 == 0:
  print('Yes')
else:
  print('No')