Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
D,N = map(int, input().split( ))

if N == 100:
    print(101* (100*d))
else:
    print(N * (100**d))


Fixed submission:
D,N = map(int, input().split( ))

if N == 100:
    print(101* (100**D))
else:
    print(N * (100**D))

Buggy python submission (verdict: Runtime Error):
D,N = map(int, input().split( ))

if n == 100:
    print(101* (100*d))
else:
    print(n * (100**d))


Fixed submission:
D,N = map(int, input().split( ))

if N == 100:
    print(101* (100**D))
else:
    print(N * (100**D))
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())

print((2*n)//math.gcd(2,n))

Fixed submission:

def gcd(a, b):
    """Calculate the Greatest Common Divisor of a and b.

    Unless b==0, the result will have the same sign as b (so that when
    b is divided by it, the result comes out positive).
    """
    while b:
        a, b = b, a%b
    return a



n = int(input())

print((2*n)//gcd(2,n))
Buggy python submission (verdict: Runtime Error):
A , B = map(int, input())
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(": (")

Fixed submission:
A , B = map(int, input().split())
if A <= 8 and B <= 8 :
    print("Yay!")
else:
    print(":(")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)


Fixed submission:
N = int(input())
if N < 1000:
    print('ABC')
else:
    print('ABD' )
Buggy python submission (verdict: Runtime Error):
a, b = map(int(), input())
x = 0
for i in range(b - a):
    x += x + i
    print(x - a)

Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a, b = map(int(),  input())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
print(( c * (c - 1) //2 + c - b))


Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d =int( c * (c - 1) /2 + c  -b)
print(d)

Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d = c * (c -1) 
p = d // 2
e = int(c -1)
f = int(1 + p + e)
print(int(f - b))



Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d = c * (c -1) 
p = d / 2
e = int(c -1)
f = int(1 + p + e)
print(int(f - b))



Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d = c * (c -1) / 2
e = int(c -1)
f = int(1 + d + e)
print(int(f - b))



Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)
Buggy python submission (verdict: Runtime Error):
import itertools


if __name__ == '__main__':
    N, A, B, K = map(int, input().split())
    li = [i for i in range(N)]
    ans = 0
    for ai in range(N):
        tmp = K-(ai*A)
        if tmp / B <= N and tmp % B == 0:
            bi = tmp // B
            a = len(list(itertools.combinations(li, ai)))
            b = len(list(itertools.combinations(li, bi)))
            ans += a*b
    print(ans)


Fixed submission:
if __name__ == '__main__':
    n = int(input())
    ans = 99999999
    for i in range(1, n):
        total = list(str(n-i)) + list(str(i))
        tmp = 0
        for t in total:
            tmp += int(t)
        ans = min(ans, tmp)
    print(ans)
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input())
    cardlist = list(map(int, input().split()))
    cardlist.sort()

    alice_s, bob_s = 0, 0
    while cardlist != []:
        alice_s += cardlist.pop()
        bob_s += cardlist.pop()
    ans = alice_s - bob_s
    print(ans)

Fixed submission:
if __name__ == '__main__':
    n = int(input())
    cardlist = list(map(int, input().split()))
    cardlist.sort()

    alice_s, bob_s = 0, 0
    while cardlist != []:
        alice_s += cardlist.pop()
        if cardlist == []:
            break
        bob_s += cardlist.pop()
    ans = alice_s - bob_s
    print(ans)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

N = int(input())

print "ABD" if N >= 1000 else "ABC"


Fixed submission:
#!/usr/bin/env python

N = int(input())

print "ABD" if N >= 1000 else "ABC"
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

s = input()
K = int(input())

os = sorted(list(set(s).union()))

nth = 0
found = []
for o in os:
  samehead = []
  for i in range(len(s)):
    if s[i] == o:
      for j in range(i+1, len(s)+1):
        if s[i:j] in samehead: continue
        samehead.append(s[i:j])
  cands = sorted(samehead)
  if nth + len(cands) < K:
    found += samehead
    nth += len(cands)
    continue
  print(cands[K-nth-1])
  break


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

s = input()
K = int(input())

os = sorted(list(set(s).union()))

nth = 0
found = []
for o in os:
  samehead = []
  for i in range(len(s)):
    if s[i] == o:
      for j in range(i+1, len(s)+1):
        if j-i>K: break
        if s[i:j] in samehead: continue
        samehead.append(s[i:j])
  cands = sorted(samehead)
  if nth + len(cands) < K:
    found += samehead
    nth += len(cands)
    continue
  print(cands[K-nth-1])
  break
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

A,B,K = map(int, input().split())

ns = list(range(A, B+1))
first =  ns[:K]
last  = ns[-K:]

u = list(set().union(first, last))

for n in u:
  print(n)


Fixed submission:
# -*- coding: utf-8 -*-

A,B,K = map(int, input().split())

l,r = A+K-1,B-K+1

if l >= r:
  first = list(range(A, r))
else:
  first = list(range(A, l+1))
last  = list(filter(lambda n: n>=A, range(r, B+1)))

for n in (first + last):
  print(n)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

A,B,K = map(int, input().split())

ns = list(range(A, B+1))
first =  ns[:K]
last  = ns[-K:]

for n in first + last:
  print(n)


Fixed submission:
# -*- coding: utf-8 -*-

A,B,K = map(int, input().split())

l,r = A+K-1,B-K+1

if l >= r:
  first = list(range(A, r))
else:
  first = list(range(A, l+1))
last  = list(filter(lambda n: n>=A, range(r, B+1)))

for n in (first + last):
  print(n)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N,Y = map(int, input().split())
if Y % 1000 != 0:
  print("-1 -1 -1")
  exit(1)

for sen in range(0, N+1):
  for gosen in range(0, N+1):
    if sen+gosen > N:
      print("-1 -1 -1")
      exit(1)
    man = N - sen - gosen
    if 10000*man + 5000*gosen + 1000*sen == Y:
      print("{} {} {}".format(man, gosen, sen))
      exit(1)


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N,Y = map(int, input().split())

for sen in range(0, N+1):
  for gosen in range(0, N+1):
    man = N - sen - gosen
    if man < 0: break
    if 10000*man + 5000*gosen + 1000*sen == Y:
      print("{} {} {}".format(man, gosen, sen))
      exit(0)

print("-1 -1 -1")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
K = int(input())

testA = 0
if testA < a:
    testA = a
if testA < b:
    testA = b
if testA < c:
    testA = c
  
ans = a + b + c + testA * (K-1)
print(ans)

Fixed submission:
a, b = (int(i) for i in input().split())

if b < a:
    ans = a - 1
else:
    ans = a

print(ans)
Buggy python submission (verdict: Runtime Error):
N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = maxnum/2
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Fixed submission:
number = input()
a = number.split()

A=int(a[0])
B=int(a[1])

if A < 9 and B < 9:
    print("Yay!")
else:
    print(":(")
Buggy python submission (verdict: Runtime Error):
number = input()
a = number.split()

D=int(a[0])
N=int(a[1])

if D=0:
    print(N)
elif D=1:
    answer = 100*N
    print(answer)
elif D=2:
    answer = 10000*N
    print(answer)

Fixed submission:
number = input()
a = number.split()

D=int(a[0])
N=int(a[1])

if N == 100:
    if D==0:
        print(N+1)
    elif D==1:
        answer = 100*N
        print(answer+100)
    elif D==2:
        answer = 10000*N
        print(answer+10000)

else:
    if D==0:
        print(N)
    elif D==1:
        answer = 100*N
        print(answer)
    elif D==2:
        answer = 10000*N
        print(answer)
Buggy python submission (verdict: Runtime Error):
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Fixed submission:
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    maxnum = int(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Buggy python submission (verdict: Runtime Error):
N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = maxnum/2
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Fixed submission:
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    maxnum = int(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)

if n_list != []:
    maxnum = max(n_list)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Fixed submission:
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    maxnum = int(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    
    A.sort()
    print(A[N - 1] - A[0])
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N = int(input())
    A = []
    data = input().split()
    for i in range(N):
        A.append(int(data[i]))
    
    A.sort()
    print(A[N - 1] - A[0])
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    
    A.sort()
    print(A[n - 1] - A[0])
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N = int(input())
    A = []
    data = input().split()
    for i in range(N):
        A.append(int(data[i]))
    
    A.sort()
    print(A[N - 1] - A[0])
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    C = [A[i] - i - 1 for i in range(N)]
    C.sort()
    m = N // 2
    x = C[m]
    left = sum([x - C[i] for i in range(m)])
    right = sum([C[i] - x for i in range(m + 1, N)])
    print(left + right)
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N = int(input())
    A = []
    data = input().split()
    for i in range(N):
        A.append(int(data[i]))
    C = [A[i] - i - 1 for i in range(N)]
    C.sort()
    m = N // 2
    x = C[m]
    left = sum([x - C[i] for i in range(m)])
    right = sum([C[i] - x for i in range(m + 1, N)])
    print(left + right)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
def main():
    A = int(input())
    B = int(input())
    if A > 8 or B > 8:
        print(":(")
    else:
        print("Yay!")

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    A, B = map(int, input().split())
    if A > 8 or B > 8:
        print(":(")
    else:
        print("Yay!")

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
    d, n = map(int, input().split())
    if d == 0:
      if n == 100:
        print(101)
      else:
        print(n)
    else:
      if n == 100:
      	print(100**d * n)
      else:
        print(100**d * 101)

Fixed submission:
a, b = map(int, input().split())
if a <= 8 and b <= 8:
	print("Yay!")
else:
	print(":(")
Buggy python submission (verdict: Runtime Error):
H, W = [int(_) for _ in input().split()]
S = [input() for _ in range(H)]

def solve(H, W, S):
    S = [s + "." for s in S] + ["." * (W + 1)]
    for y in range(H):
        for x in range(H):
            if (S[y][x] == "#" and
                S[y][x + 1] == "." and S[y][x - 1] == "." and
                S[y + 1][x] == "." and S[y - 1][x] == "."
            ):
                return False
    return True

if solve(H, W, S):
    print("Yes")
else:
    print("No")


Fixed submission:
H, W = [int(_) for _ in input().split()]
S = [input() for _ in range(H)]

def solve(H, W, S):
    S = [s + "." for s in S] + ["." * (W + 1)]
    for y in range(H):
        for x in range(W):
            if (S[y][x] == "#" and
                S[y][x + 1] == "." and S[y][x - 1] == "." and
                S[y + 1][x] == "." and S[y - 1][x] == "."
            ):
                return False
    return True

if solve(H, W, S):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
# http://nobuta05.hatenablog.com/entry/2015/11/12/013938

def get_edge(M, u, U=None):

    if U == None:
        for x in M[:]:
            if x[0] == u:
                return x[1]
            elif x[1] == u:
                return x[0]

    else:
        for x in M[:]:
            if x[0] == u and x[1] in U:
                return x[1]
            elif x[1] == u and x[0] in U:
                return x[0]
    return None

def get_nodes(M):
    U = set()
    V = set()
    for x in M:
        U.add(x[0])
        V.add(x[1])
    return (U, V)


def augpath(Si, Ti, M, E):
    (U, V) = get_nodes(M)
    Ti1 = set(x[1] for x in E if x[0] in Si and not x[1] in Ti)
    
    if Ti1 == set():
        return (M, None)

    elif Ti1.difference(V) == set():
        Si1 = set(x[0] for x in M if x[1] in Ti1)
        (M, ui1) = augpath(Si1, Ti.union(Ti1), M, E)

        if ui1 == None:
            return (M, None)

        else:
            v = get_edge(M, ui1)
            M.remove((ui1,v))

            ui = get_edge(E, v, U=Si)
            M.append((ui,v))
            
            return (M, ui)

    else:
        v = Ti1.difference(V).pop()
        u = get_edge(E, v, U=Si)
        M.append((u,v))

        return (M, u)
    

def Hungary(U0, V0, E):
    U_bef = set()
    M = []
    cnt = 0
    length = len(U0)
    
    # CALC
    while True:

        # INIT
        (U, V) = get_nodes(M)
        u = U0[cnt%length]
        cnt = cnt + 1
        S0 = set()
        S0.add(u)
        T0 = set()

        # 終了条件(すべての頂点から始まる増大道を調べて、マッチング数が変わっていなければ、それ以上増えることはない)
        if cnt % length == 0:
            if U.difference(U_bef) == set():
                break
            U_bef = U.copy()

        # 枝刈り(すでにマッチングしている頂点から始まる道は増大道ではない)
        if u in U:
            continue
        
        #CALC
        (M, u) = augpath(S0, T0, M, E)
    
    return M


N = int(input())
AB = [[int(_) for _ in input().split()] for i in range(N)]
CD = [[int(_) for _ in input().split()] for i in range(N)]

E = []

for i in range(N):
    for j in range(N):
        if AB[i][0] < CD[j][0] and AB[i][1] < CD[j][1]:
            E.append((i, j))

M = Hungary(range(N), range(N), E)
print(len(M))


Fixed submission:
N = int(input())
AB = [tuple(int(_) for _ in input().split()) for i in range(N)]
CD = [tuple(int(_) for _ in input().split()) for i in range(N)]

AB.sort(key=lambda xy:xy[1], reverse=True)
CD.sort()
for c, d in CD:
    for a, b in AB:
        if a < c and b < d:
            AB.remove((a, b))
            break

print(N - len(AB))
Buggy python submission (verdict: Runtime Error):
import os
import sys


n = input()
a = []
for i in range(n):
    a.append(input())

print(len(set(a)))

Fixed submission:
import os
import sys


n = input()
a = []
for i in range(int(n)):
    a.append(input())

print(len(set(a)))
Buggy python submission (verdict: Runtime Error):
for line in sys.stdin:
    card = line.split(" ")
    alice = int(card[0])
    bob = int(card[1])
    if alice == 1:
        alice += 13
    if bob == 1:
        bob += 13
        
    if alice > bob:
        print("Alice")
    elif alice < bob:
        print("Bob")
    else:
        print("Draw")

Fixed submission:
import sys
 
for line in sys.stdin:
    card = line.split(" ")
    alice = int(card[0])
    bob = int(card[1])
    if alice == 1:
        alice += 13
    if bob == 1:
        bob += 13
        
    if alice > bob:
        print("Alice")
    elif alice < bob:
        print("Bob")
    else:
        print("Draw")

Buggy python submission (verdict: Runtime Error):
!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 import sys
 
 for line in sys.stdin:
     card = line.split(" ")
 
     if card[0] > card[1]:
        print("Alice")
    elif card[0] < card[1]:
        print("Bob")
    else:
        print("Draw")

Fixed submission:
import sys
 
for line in sys.stdin:
    card = line.split(" ")
    alice = int(card[0])
    bob = int(card[1])
    if alice == 1:
        alice += 13
    if bob == 1:
        bob += 13
        
    if alice > bob:
        print("Alice")
    elif alice < bob:
        print("Bob")
    else:
        print("Draw")
Buggy python submission (verdict: Runtime Error):
#include <string>
#include <iostream>

using namespace std;

const int nmax = 50;
const int mmax = 50;
char N_sq[nmax][nmax], M_sq[mmax][mmax];


bool judge_match(int x, int y, int M){
	for(int i=0;i<M;i++){
		for(int j=0;j<M;j++){
			if(N_sq[y+i][x+j] != M_sq[y+i][x+j]) return false;
		}
	}
	return true;
}


int main(void){
	int N,M;

	cin >> N >> M;
	bool exist = false;

	for(int y=0;y < N;y++){
		for(int x;x < N;x++){
			cin >> N_sq[y][x];
		}
	}

	for(int y=0;y < M;y++){
		for(int x;x < M;x++){
			cin >> M_sq[y][x];
		}
	}

	for(int y=0;y <= N - M;y++){
		for(int x=0;x <= N - M;x++){
			if(judge_match(x, y, M)) exist=true;
		}
	}

	if(exist)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;

	return 0;

}

Fixed submission:
import sys

count = 0
N_list = []
M_list = []
for line in sys.stdin:
    line = line.rstrip("\n")
    if count == 0:
        line = line.split(" ")
        N = int(line[0])
        M = int(line[1])
    elif count <= N:
        N_list.append(line)
    else:
        M_list.append(line)
    count+=1
    
    
def judge_match(N_l, M_l):
    slide_count = len(N_l[0]) - len(M_l[0]) + 1
    count = 0
    for j in range(slide_count):
        count = 0
        for i in range(len(N_l)):
            if N_l[i][j:j+len(M_l[0])] == M_l[i]:
                count += 1
                if count == len(M_l):
                    return count
    return count

m_count = 0
for i in range(len(N_list)):
    m_count = judge_match(N_list[i:i+len(M_list)], M_list)
    if m_count == len(M_list):
        print("Yes")
        exit(0)
print("No")
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if (a*b)%2==1:
    print("Odd")
else:
    print("Even")

Fixed submission:
a,b = map(int,input().split())
if a*b%2==1:
    print("Odd")
else:
    print("Even")

Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if a*b%2==1:
    print("Odd")
else:
    print("Even")

Fixed submission:
a,b = map(int,input().split())
if a*b%2==1:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
s = input()
s[3]="8"
print(s)

Fixed submission:
s = input()
print(s.replace("2017","2018"))
Buggy python submission (verdict: Runtime Error):
n,y = map(int,(input()))
x,y,z = map(int,"-1"*3)
for i in range(n+1):
    for j in range(n+1):
        z=y-i*10000-j*5000
        if z==(n-i-j):
            x=i
            y=j
            z=n-i-j
print(x,y,z)


Fixed submission:
n,Y = map(int,(input().split()))
x = 0
y = 0
z = 0
f = True
for i in range(n+1):
    for j in range(n+1):
        k=Y-i*10000-j*5000
        if k==(n-i-j)*1000 and k>=0:
            x=i
            y=j
            z=int(k/1000)
            f=False
if f :
    x = -1
    y = -1
    z = -1
print(x,y,z)
Buggy python submission (verdict: Runtime Error):
n = "".join(map(int,input().split()))
print(sum(n))

Fixed submission:
n = input()
ans = 0
for i in range(len(n)):
    ans += int(n[i])
print(ans)
Buggy python submission (verdict: Runtime Error):
a = map(int,input().split())
a = a[0]*100 + a[1]*10 + a[2]
if a%4 == 0:
    print("YES")
else:
    print("NO")

Fixed submission:
a = [int(i) for i in input().split()]
a = a[0]*100 + a[1]*10 + a[2]
if a%4 == 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())
f = 0
for i in range(k+1):
    for j in range(k+1):
        for l in range(k+1):
            if i+j+l==s:
                f+=1
print(f)

Fixed submission:
k,s = map(int,input().split())
f = 0
for i in range(k+1):
    for j in range(k+1):
        l = s-i-j
        if 0 <= l <=k:
            f+=1
print(f)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())
f = 0
for i in range(k):
    for j in range(k):
        for l in range(k):
            if sum(i,j,l)==s:
                f+=1
print(f)

Fixed submission:
k,s = map(int,input().split())
f = 0
for i in range(k+1):
    for j in range(k+1):
        l = s-i-j
        if 0 <= l <=k:
            f+=1
print(f)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())
f = 0
for i in range(k):
    for j in range(k):
        for l in range(k):
            if sum(i,j,k)==s:
                f+=1
print(f)

Fixed submission:
k,s = map(int,input().split())
f = 0
for i in range(k+1):
    for j in range(k+1):
        l = s-i-j
        if 0 <= l <=k:
            f+=1
print(f)