Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03160 (python)

Fixed submission:
import sys

def dp(costs):
    table = [0]
    for i in range(1, len(costs)):
        if i == 1:
            table.append(table[0] + abs(costs[0] - costs[1]))
            continue
        one_step = table[i-1] + abs(costs[i-1] - costs[i])
        two_step = table[i-2] + abs(costs[i-2] - costs[i])
        table.append(min([one_step, two_step]))
    return table[-1]
        
def main():
    for index, line in enumerate(sys.stdin):
        if index == 0:
            continue
        costs = [int(s) for s in line.split(" ")]
        print(dp(costs))

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def dp(costs, K):
    table = [0]
    for i in range(1, len(costs)):
        min_cost = table[i-1] + abs(costs[i-1] - costs[i])
        for j in range(2, K + 1):
            jump = i - j
            if(jump >= 0):
                step = table[jump] + abs(costs[jump] - costs[i])
                min_cost = min([min_cost, step])
            else: 
                break
        table.append(min_cost)
    return table[-1]
        
def main():
    for index in range(2):
        line = input()
        if index == 0:
            K = int(line.split(" ")[1])
            continue
        costs = [int(s) for s in line.split(" ")]
        print(dp(costs, K))

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import typing 
import sys

def dp(costs: typing.List[int]) -> int:
    table = [0]
    for i in range(1, len(costs)):
        if i == 1:
            table.append(table[0] + abs(costs[0] - costs[1]))
            continue
        one_step = table[i-1] + abs(costs[i-1] - costs[i])
        two_step = table[i-2] + abs(costs[i-2] - costs[i])
        table.append(min([one_step, two_step]))
    return table[-1]
        
def main():
    for index, line in enumerate(sys.stdin):
        if index == 0:
            continue
        costs = [int(s) for s in line.split(" ")]
        print(dp(costs))

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def dp(costs, K):
    table = [0]
    for i in range(1, len(costs)):
        min_cost = table[i-1] + abs(costs[i-1] - costs[i])
        for j in range(2, K + 1):
            jump = i - j
            if(jump >= 0):
                step = table[jump] + abs(costs[jump] - costs[i])
                min_cost = min([min_cost, step])
            else: 
                break
        table.append(min_cost)
    return table[-1]
        
def main():
    for index in range(2):
        line = input()
        if index == 0:
            K = int(line.split(" ")[1])
            continue
        costs = [int(s) for s in line.split(" ")]
        print(dp(costs, K))

if __name__ == "__main__":
    main()
Problem p03161 (python)

Fixed submission:
import sys
import math

def dp(costs, K):
    table = [0]
    for i in range(1, len(costs)):
        min_cost = table[i-1] + abs(costs[i-1] - costs[i])
        for j in range(2, K + 1):
            jump = i - j
            if(jump >= 0):
                step = table[jump] + abs(costs[jump] - costs[i])
                min_cost = min([min_cost, step])
            else: 
                break
        table.append(min_cost)
    return table[-1]
        
def main():
    for index in range(2):
        line = input()
        if index == 0:
            K = int(line.split(" ")[1])
            continue
        costs = [int(s) for s in line.split(" ")]
        print(dp(costs, K))

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import typing 
import sys
import math

def dp(costs: typing.List[int], K: int) -> int:
    table = [0]
    for i in range(1, len(costs)):
        min_cost = table[i-1] + abs(costs[i-1] - costs[i])
        for j in range(2, K + 1):
            jump = i - j
            if(jump >= 0):
                step = table[jump] + abs(costs[jump] - costs[i])
                min_cost = min([min_cost, step])
            else: 
                break
        table.append(min_cost)
    return table[-1]
        
def main():
    for index in range(2):
        line = input()
        if index == 0:
            K = int(line.split(" ")[1])
            continue
        costs = [int(s) for s in line.split(" ")]
        print(dp(costs, K))

if __name__ == "__main__":
    main()
Problem p03126 (python)

Fixed submission:
import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  if len(sa) > 1:
    for saj in sa[1:]:
      aj = int(saj)
      flg[aj - 1] += 1

suma = 0
for sumaj in flg:
  if sumaj == n:
    suma += 1
print(suma)

Buggy submission (verdict: Runtime Error):
import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  if len(sa) > 1:
	  for saj in sa[1:]:
    	aj = int(saj)
    	flg[aj - 1] += 1

suma = 0
for sumaj in flg:
  if sumaj == n:
    suma += 1
print(suma)

Buggy submission (verdict: Runtime Error):
import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  if len(sa) > 1:
	  for saj in sa[1:]
    	aj = int(saj)
    	flg[aj - 1] += 1

suma = 0
for sumaj in flg:
  if sumaj == n:
    suma += 1
print(suma)

Buggy submission (verdict: Runtime Error):
import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  for saj in sa[1:]
    aj = int(saj)
    flg[aj - 1] += 1

suma = 0
for sumaj in flg:
  if sumaj == n:
    suma += 1
print(suma)

Buggy submission (verdict: Runtime Error):
import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  for saj in sa:
    aj = int(saj)
    flg[aj - 1] += 1

suma = 0
for sumaj in range(flg):
  if sumaj == n:
    suma += 1
print(suma)
Problem p03125 (python)

Fixed submission:
def divisor(A, B):
    if A==1:
        return A + B
    if B==1:
        return B-A
    if B % A == 0:
        return A + B
    return B - A

A, B = map(int, input().split(" "))
print(divisor(A, B))

Buggy submission (verdict: Runtime Error):
def divisor(A, B):
    if A==1:
        return A + B
    if B==1:
        return B-A
    if B % A == 0:
        return A + B
    return B - A
  
  A, B = map(int, input().split(" "))
  print(divisor(A, B))
Problem p03125 (python)

Fixed submission:
a, b = map(int, input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if b%a==0:;print(a+b)
else:;print(b-a)
Problem p03128 (python)

Fixed submission:
#python3.4
import math
def inpul(): return list(map(int, input().split()))

N, M = inpul()
A = inpul()

c = [0,2,5,5,4,5,6,3,7,6]
f = [-1]*10010

f[0] = 0
for i in range(1, N+1):
	for x in A:
		if i-c[x] >= 0:
			f[i] = max(f[i], f[i-c[x]]*10+x)
print(f[N])

Buggy submission (verdict: Runtime Error):
#python3.4
import math
def inpul(): return list(map(int, input().split()))

N, M = inpul()
A = inpul()

c = [0,2,5,5,4,5,6,3,7,6]
f = [-1]*10010

f[0] = 0
for i in range(1, N+1):
	for x in a:
		if i-c[x] >= 0:
			f[i] = max(f[i], f[i-c[x]]*10+x)
print(f[n])
Problem p03125 (python)

Fixed submission:
nums = input().split(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
  print(num1+num2)
else:
  print(num2-num1)

Buggy submission (verdict: Runtime Error):
nums = input().spilt(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
    print(num1+num2)
else:
    print(num2-num1)

Buggy submission (verdict: Runtime Error):
nums = input().spilt(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
  print(num1+num2)
else:
  print(num2-num1)
Problem p03125 (python)

Fixed submission:
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, input().split())
    if b % a == 0:
        print(b + a)
    else:
        print(b - a)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, raw_input().split())
    if b % a == 0:
        print(b + a)
    else:
        print(b - a)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, raw_input().split())
    if int(b) % int(a) == 0:
	print(int(a) + int(b))
    else:
	print(int(b)-int(a))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)
rl = lambda: sys.stdin.readline().strip()

def main():
    """ Code implementation """
    a, b = rl().split()
    if int(b) % int(a) == 0:
	print(int(a) + int(b))
    else:
	print(int(b)-int(a))

if __name__ == '__main__':
    main()
Problem p03125 (python)

Fixed submission:
A, B = [int(s) for s in input().split(' ')]

if B % A == 0:
  print(A + B)
else:
  print(B - A)

Buggy submission (verdict: Runtime Error):
A, B = [int(s) for in input().split(' ')]

if A % B:
  print(A + B)
else:
  print(B - A)
Problem p03287 (python)

Fixed submission:
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factorial(n)/(2*math.factorial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factrial(n)//(2*math.factrial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import collections
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kaijo(n):
    if n == 0:
        return 1
    else:
        return n*kaijo(n-1)
def kumi(n):
    return int(kaijo(n)/(2*kaijo(n-2)))
for i in aaa:
    x += kumi(i)
print(x)
Problem p03126 (python)

Fixed submission:
n, m = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(n)]
dic = {}
for hobbies in e:
    for i in range(1,len(hobbies)):
        if hobbies[i] in dic:
            dic[hobbies[i]] +=1
        else:
            dic[hobbies[i]] = 1
everyoneLike = []
for key,num in dic.items():
    if num == n:
        everyoneLike.append(key)
print(len(everyoneLike))

Buggy submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(n)]
dic = {}
for hobbies in e:
    for i in range(1,len(hobbies)+1):
        if hobbies[i] in dic:
            dic[hobbies[i]] +=1
        else:
            dic[hobbies[i]] = 0
everyoneLike = []
for key,num in dic.items():
    if num == n:
        everyoneLike.append(key)
print(len(everyoneLike))
Problem p03129 (python)

Fixed submission:
n, k = (int(i) for i in input().split())
re = ""
if (2 * k - 1) <= n:
    re = "YES"
else:
    re = "NO"
print(re)

Buggy submission (verdict: Runtime Error):
n, k = input()
re = ""
if n - k > 0:
    re="YES"
else:
    re="NO"
print(re)

Buggy submission (verdict: Runtime Error):
n, k = input()
re = ""
if n - k > 0:
    re.jpin("YES")
else:
    re.jpin("NO")
print(re)

Buggy submission (verdict: Runtime Error):
if n - k > 0:
    return "YES"
else:
    return "NO"
Problem p03385 (python)

Fixed submission:
S=input()
x='abc'
ck=1
for i in x:
	if i in S:
		ck=ck*1
	else:
		ck=ck*0
if ck==1:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
ip=[int(x) for x in input().split()]
a=ip[0];b=ip[1];k=ip[2]
ans=list()
for i in range(0,k):
    ans.append(a)
    ans.append(b)
    a=a+1
    b=b-1
    if((a==ip[1])|(b==ip[0])):
        break
res=list(set(ans))
res.sort()
for i in res:
    print(i)
Problem p03386 (python)

Fixed submission:
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)

Buggy submission (verdict: Runtime Error):
import numpy as np
ip=[int(x) for x in input().split()]
x=ip[1]-ip[0]+1
n=np.linspace(ip[0],ip[1],x)
xl=list(n[:ip[2]])
xh=list(n[-ip[2]:])
ans=xl+xh
anss=list(set(ans))
anss.sort()
for i in anss:
	print(int(i))

Buggy submission (verdict: Runtime Error):
ip=[int(x) for x in input().split()]
n=list(range(ip[0],ip[1]+1))
xl=n[:ip[2]]
xh=n[-ip[2]:]
ans=xl+xh
anset=list(set(ans))
anset.sort()
for i in anset:
	print(i)

Buggy submission (verdict: Runtime Error):
ip=[int(x) for x in input().split()]
n=list(range(ip[0],ip[1]+1))
print(n)
xl=n[:ip[2]]
xh=n[-ip[2]:]
ans=xl+xh
anset=list(set(ans))
anset.sort()
for i in anset:
	print(i)
Problem p03125 (python)

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

if(b%a==0):
    print(a+b)
else:
    print(b-a)

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    r = a%b
    #print(a,b,r)
    if(r==0): return b
    return gcd(b,r)
n = int(input()) 
#n=4
hps = [int(i) for i in input().split()]
#lst = [2, 2, 8, 40]
#lst = [5, 13, 8, 1000000000]
#lst = [0, 1, 0]
    ##2 4 5 -> 1
    ## minと全ての要素のgcd
hps = sorted(hps)
for i in range(1,n):
    hps[0] = gcd(hps[i], hps[0])
print(hps)
for i in range(len(hps)):
    if(hps[i]==0): continue
    print(hps[i])
    break

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input()) 
#n=4
lst = [int(i) for i in input().split()]
#lst = [2, 2, 8, 40]
#lst = [5, 13, 8, 1000000000]
#lst = [0, 1, 0]
hps = np.array(lst)
while(1):
    hps = sorted(hps)
    #print(hps)
    if(hps[0]==0): break
    if(hps[0]==hps[len(hps)-1]): break
    hps[1] = hps[1] - hps[0]
print(hps[1])
Problem p03126 (python)

Fixed submission:
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(N)]
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Buggy submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(n)]

Buggy submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(n)] 
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Buggy submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(n)] 

import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Buggy submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
for num in range(N):
    lst[num] = [int(i) for i in input().split()]
    
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))
Problem p03125 (python)

Fixed submission:
a,b = [int(k) for k in input().split()]
if b%a:
  print(abs(b-a))
else:
  print(a+b)

Buggy submission (verdict: Runtime Error):
a,b = [int(k) for k in input.split()]
if b%a:
  print(abs(b-a))
else:
  print(a+b)
Problem p03125 (python)

Fixed submission:
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a!=0])

Buggy submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a])

Buggy submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
print([a+b,b-a][b%a])
Problem p03126 (python)

Fixed submission:
n, k = [int(i) for i in input().split()]
lines = [set(input().split()[1:]) for i in range(n)]
diff = set(lines[0])
for i in range(1,len(lines)):
  diff = diff&lines[i]
print(len(diff))

Buggy submission (verdict: Runtime Error):
n, k = [int(i) for i in input().split()]
lines = [set(input().split()[1:]) for i in range(n)]
diff = set(lines[0])
for i in range(1,len(lines)):
  diff = diff&line
print(len(diff))
Problem p03145 (python)

Fixed submission:
arr = sorted(list(map(int,input().split())))
print(int(arr[0]*arr[1]/2))

Buggy submission (verdict: Runtime Error):
arr = sorted(input().split())
print(arr[0]*arr[1]/2)
Problem p03280 (python)

Fixed submission:
string = input()
a, b = int(string.split(' ')[0]), int(string.split(' ')[1])
result = a * b - (a + b -1)
print(result)

Buggy submission (verdict: Runtime Error):
string = input()
a, b = string.split(' ')[0], string.split(' ')[1]
result = a * b - (a + b -1)
print(result)
Problem p03125 (python)

Fixed submission:
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else
  print(b - a)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if( b % a === 0){
  print a + b
} else {
  print b - a 
}

Buggy submission (verdict: Runtime Error):
a,b=[int(i) for i in input().split()] 
if( a/b === 0){
  print a + b
} else {
  print b -a 
}
Problem p03323 (python)

Fixed submission:
a, b = map(int, raw_input().split())

if a<=8 and b<=8:
    print "Yay!"
else:
    print ":("

Buggy submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

if a<=8 and b<=8:
    print "Yay!"
else:
    print ":("

Buggy submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

if a<=8 and b<=8:
    print "Yay!"
else:
    print ":("

Buggy submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

if a<=8 and b<=8:
    print "Yay!"
else:
    print ":("
Problem p03126 (python)

Fixed submission:
n, m = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
result = [0 for i in range(m)]
for mindex in range(0,m):
    for nindex in range(0,n):
        for kindex in range(1,a[nindex][0]+1):
            if a[nindex][kindex] == mindex+1:
                result[mindex]+=1
            else:
                pass
                
 
print(result.count(n))

Buggy submission (verdict: Runtime Error):
n = int(input())
m = int(input())
a = [list(map(int, input().split())) for i in range(0,n)]
result = [0 for i in range(m)]

for mindex in range(0,m):
    for nindex in range(0,n):
        for kindex in range(1,a[nindex][0]+1):
            if a[nindex][kindex] == mindex+1:
                result[mindex]+=1
            else:
                pass
                

print(result.count(n+1))
Problem p03280 (python)

Fixed submission:
n = list(map(int, input().split()))
print((n[0]-1)*(n[1]-1))

Buggy submission (verdict: Runtime Error):
n = list(map(int, input().split()))
print(n[0]*n[1})
Problem p03288 (python)

Fixed submission:
R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Buggy submission (verdict: Runtime Error):
R = input()
if R < 1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if a*b%2 == 0:
    print('Even')
else:
    print('Odd')
Problem p03126 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 16 21:12:07 2019

@author: yff20
"""

l1 = input().split()

ln = [0] * (int(l1[1]))

for num in range(0, int(l1[0])):
   l2 = input().split()
   for index in range(1, len(l2)):
       ln[int(l2[int(index)])-1] += 1
    
count = 0

for i in ln:
    if(i==int(l1[0])):
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 16 21:12:07 2019

@author: yff20
"""

l1 = input().split()

ln = [0] * (int(l1[1])-1)

for num in range(0, int(l1[0])):
   l2 = input().split()
   for index in range(1, len(l2)):
       ln[int(l2[int(index)])-1] += 1
    
count = 0

for i in ln:
    if(i==int(l1[0])):
        count += 1

print(count)
Problem p03323 (python)

Fixed submission:
l = input().split()
a = int(l[0])
b = int(l[1])

if(a > 8 or b > 8):
    print (':(') 
else:
    print ('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if(a > 8 or b > 8):
    print (':(') 
else:
    print ('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if(a > 8 or b > 8):
    print (':(') 
else:
    print ('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if(a > 8 or b > 8):
    print (':(') 
else:
    print ('Yay!')

Buggy submission (verdict: Runtime Error):
a = input()
b = input()

if(a > 8 || b > 8):
    print(':(')
else:
    print('Yay!')
Problem p03423 (python)

Fixed submission:
n = 0

n = input()

ans = 0

ans = n/3

print(ans)

Buggy submission (verdict: Runtime Error):
pink = 0
green = 0
white = 0
yellow = 0

n = input()
l = raw_input().split()
 
for i in range(n):
   
    if(l[i] == 'P'):
        pink = 1

    if(l[i]== 'G'):
        green = 1

    if(l[i] == 'W'):
        white = 1

    if(l[i] == 'Y'):
        yellow = 1

if(pink + white + green + yellow) == 4:
    print u"Four"
else:
    print u"Three"

Buggy submission (verdict: Runtime Error):
pink = 0
green = 0
white = 0
yellow = 0

n = input()
l = raw_input().split()
 
for i in range(n):
   
    if(l[i] == 'P'):
        pink = 1

    if(l[i]== 'G'):
        green = 1

    if(l[i] == 'W'):
        white = 1

    if(l[i] == 'Y'):
        yellow = 1

if(pink + white + green + yellow) == 4:
    print('Four')
else:
    print('Three')

Buggy submission (verdict: Runtime Error):
pink = 0
green = 0
white = 0
yellow = 0

n = input()
l = raw_input().split()
 
for i in range(n):
   
    if(l[i] == 'P'):
        pink = 1

    if(l[i]== 'G'):
        green = 1

    if(l[i] == 'W'):
        white = 1

    if(l[i] == 'Y'):
        yellow = 1

if(pink + white + green + yellow) == 4:
    print('Four')

if(pink + white + green + yellow) == 3:
    print('Three')
Problem p03284 (python)

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

if N % K == 0:
  print(0)
  
else:
  print(1)

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

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

if(N = 0):
    min = 0
    
elif(N >= K):
    min = N % K

else:
    min = 1

print(abs(min))
Problem p03125 (python)

Fixed submission:
A, B = list(map(int,input().split()))
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Buggy submission (verdict: Runtime Error):
A, B = map(int,input().split())
if B % A == 0:
  print(A+B)
 else:
  print(B-A)