Buggy python submission (verdict: Runtime Error):
def isDivBy9(n): 
    if (n == 0 or n == 9): 
        return True
    if (n < 9): 
        return False

    # If n is greater than 9, 
    # then recur for [floor(n / 9) - n % 8] 
    return isDivBy9((int)(n>>3) - (int)(n&7)) 

N = int(input())

if(isDivBy9(N)):
    print("Yes")
else:
    print("No")

Fixed submission:
def check(st) : 
  
    # Compute sum of digits 
    n = len(st) 
    digitSum = 0
      
    for i in range(0,n) : 
        digitSum = digitSum + (int)(st[i]) 
  
    # Check if sum of digits 
    # is divisible by 9. 
    return (digitSum % 9 == 0) 
  
# Driver code 
x = input()
st= str(x)
  
if(check(st)) : 
    print("Yes") 
else :  
    print("No")

Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":


    def isDivBy9(n): 
        if (n == 0 or n == 9): 
            return True
        if (n < 9): 
            return False
    
        # If n is greater than 9, 
        # then recur for [floor(n / 9) - n % 8] 
        return isDivBy9((int)(n>>3) - (int)(n&7)) 

    N = int(input())
    
    if(isDivBy9(N)):
        print("Yes")
    else:
        print("No")

Fixed submission:
def check(st) : 
  
    # Compute sum of digits 
    n = len(st) 
    digitSum = 0
      
    for i in range(0,n) : 
        digitSum = digitSum + (int)(st[i]) 
  
    # Check if sum of digits 
    # is divisible by 9. 
    return (digitSum % 9 == 0) 
  
# Driver code 
x = input()
st= str(x)
  
if(check(st)) : 
    print("Yes") 
else :  
    print("No")

Buggy python submission (verdict: Runtime Error):
def isDivBy9(n): 
  
    # Base cases 
    if (n == 0 or n == 9): 
        return True
    if (n < 9): 
        return False
   
    # If n is greater than 9, 
    # then recur for [floor(n / 9) - n % 8] 
    return isDivBy9((int)(n>>3) - (int)(n&7)) 
  



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

    if(isDivBy9(N)):
        print("Yes")
    else:
        print("No")

Fixed submission:
def check(st) : 
  
    # Compute sum of digits 
    n = len(st) 
    digitSum = 0
      
    for i in range(0,n) : 
        digitSum = digitSum + (int)(st[i]) 
  
    # Check if sum of digits 
    # is divisible by 9. 
    return (digitSum % 9 == 0) 
  
# Driver code 
x = input()
st= str(x)
  
if(check(st)) : 
    print("Yes") 
else :  
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == "__main__":
    x = input()
    x = int(x)

    digits = 200000
    index = 200000

    tmp1 = []
    for i in range(digits):
        tmp2 = pow(2,index)

        if(tmp2>x):
            continue
        tmp3 = x%tmp2
        if tmp2 != 0:
            x -= tmp3*index
            tmp1.append(tmp3)
        index -= 1
    result1 = sum(tmp1)

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



Fixed submission:
def check(st) : 
  
    # Compute sum of digits 
    n = len(st) 
    digitSum = 0
      
    for i in range(0,n) : 
        digitSum = digitSum + (int)(st[i]) 
  
    # Check if sum of digits 
    # is divisible by 9. 
    return (digitSum % 9 == 0) 
  
# Driver code 
x = input()
st= str(x)
  
if(check(st)) : 
    print("Yes") 
else :  
    print("No")