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

Fixed submission:
n = int(input())
abc = [list(map(int, input().split())) for i in range(n)]

dp = [[0]*3 for i in range(n)]
dp[0] = abc[0]

for i in range(1,n):
    dp[i][0] = max(dp[i-1][1:3]) + abc[i][0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + abc[i][1]
    dp[i][2] = max(dp[i-1][0:2]) + abc[i][2]
print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
dp = [[0]*3 for i in range(n)]
dp[0] = abc[0]

for i in range(1,n):
    dp[i][0] = max(dp[i][1:3]) + abc[i][0]
    dp[i][1] = max(dp[i][0], dp[i][2]) + abc[i][1]
    dp[i][2] = max(dp[i][0:2]) + abc[i][2]
max(dp[n-1])
Problem p03407 (python)

Fixed submission:
a,b,c = input().split()

if (int(a) + int(b) >= int(c)):
    print ('Yes')
else:
    print ('No')

Buggy submission (verdict: Runtime Error):
#include<stdio.h>
main(void)
{
    int a,b,c;
    scanf("%d,%d,%d", &a,&b,&c);
    if(a + b >= c){
        printf("Yes");
    } else {
        printf("No");
    }
}

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

if (int(a) + int(b) >= int(c)):
    print ('Yes')
else:
    print ('No')

Buggy submission (verdict: Runtime Error):
print ('A B C = ?')
a,b,c = input(),input(),input()

if (int(a) + int(b) >= int(c)):
    print ('Yes')
else:
    print ('No')

Buggy submission (verdict: Runtime Error):
print ('A B C = ?')
a,b,c = input(),input(),input()

if (a + b >= c):
    print ('Yes')
else:
    print ('No')

Buggy submission (verdict: Runtime Error):
print ('A B C = ?')
a,b,c = input(),input(),input()

if (a + b >= c):
    print ('Yes')
else:
    print ('No')
Problem p03557 (python)

Fixed submission:
import bisect
n = int(input())
abc = [sorted(list(map(int, input().split()))) for i in range(3)]
print(sum([bisect.bisect_left(abc[0], b)*(n-bisect.bisect_right(abc[2], b)) for b in abc[1]]))

Buggy submission (verdict: Runtime Error):
from bisect import *
n = int(input())
abc = [sorted(list(map(int, input().split()))) for i in range(3)]
print(sum([bisect.bisect_left(abc[0], b)*(n-bisect.bisect_right(abc[2], b)) for b in abc[1]]))

Buggy submission (verdict: Runtime Error):
import bisect
import numpy as np
n = int(input())
abc = [sorted(list(map(int, input().split()))) for i in range(3)]

unko = np.zeros(n)
for c in abc[2]:
  unko[:bisect.bisect_left(abc[1], c)] += 1
s = 0

print()
for i in range(len(abc[1])):
  s += bisect.bisect_left(abc[0], abc[1][i])*unko[i]
  
print(int(s))
Problem p02934 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  sum = sum + 1/i
print(1/sum)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in range(n):
  sum = sum + 1/data[i]
print(1/sum)

Buggy submission (verdict: Runtime Error):
n=int(input())
data = [input() for i in range(n)]
sum=0
for i in range(n):
  sum = sum + 1/data[i]
print(1/sum)
Problem p02934 (python)

Fixed submission:
try:
    N = int(input())
    if N>0 or N<=100:
        S = input()
        A = S.split()
        A = list(map(int, A)) 
 
        sum1 = 1/A[0]
 
        for i in range(0,N-1):
         sum1 = sum1 + 1/A[i+1]
 
        result = 1/sum1
        print(result)

except:
        print("Error")

Buggy submission (verdict: Runtime Error):
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=1000:
          A.append(B)
      else:
          break
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = int(1/sum1)
    print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=1000:
          A.append(B)
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = int(1/sum1)
    print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=100:
          A.append(B)
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = 1/sum1
    print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = []
for i in range(0,N):
  B = int(input())
  A.append(B)

sum1 = float(1/A[0])

for i in range(0,N-1):
  sum1 = sum1 + 1/A[i+1]

result = 1/sum1
print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = []
for i in range(0,N):
  B = int(input())
  A.append(B)

sum1 = float(1/A[0])

for i in range(0,N-1):
  sum1 = sum1 + 1/A[i+1]

result = 1/sum1
print(result)
Problem p02934 (python)

Fixed submission:
def main():
    n = int(input())
    nums = list(map(int, input().split()))
    print('{:.16g}'.format(1 / sum(1 / x for x in nums)))


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
 def main():
    n = int(input())
    nums = list(map(int, input().split()))
    print('{:.16g}'.format(1 / sum(1 / x for x in nums)))


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np
 
 
def main():
    n = int(input())
    nums = np.array([int(input()) for i in range(n)])
    n_total = nums.prod()
    n_denominator = sum([n_total/num for num in nums])
    ans = n_total / n_denominator
    print(ans)
  
  
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np
 
 
def main():
	n = int(input())
    nums = np.array([int(input()) for i in range(n)])
    n_total = nums.prod()
    n_denominator = sum([n_total/num for num in nums])
    ans = n_total / n_denominator
    print(ans)
  
  
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np


def main():
	n = int(input())
    nums = np.array([int(input()) for i in range(n)])
    n_total = nums.prod()
    n_denominator = sum([n_total/num for num in nums])
    ans = n_total / n_denominator
    print(ans)
  
  
if __name__ == '__main__':
    main()
Problem p02936 (python)

Fixed submission:
import collections

n,q=map(int,input().split())
cnt=[0]*(n+1)
g=[[] for _ in range(n+1)]
for _ in range(n-1): #木グラフの隣接リストを作成
 a,b=map(int,input().split())
 g[a].append(b)
 g[b].append(a)
for _ in range(q): #各頂点についてcount[v]を計算
 v,val=map(int,input().split())
 cnt[v]+=val
q=collections.deque()
q.append(1) #DFSのスタックによる実装、まずスタックに始点1を積む
checked=[0]*(n+1) #各頂点を見たかどうかのフラグを持っておく
while q:
 v=q.pop()
 checked[v]=1 #頂点を見たかどうかのフラグを更新する
 for u in g[v]:
   if checked[u]==1: #vの子ノードuについて、まだ見ていない頂点であればcount[u]をcount[u]+=count[v]として更新する
     continue
   cnt[u]+=cnt[v]
   q.append(u) #スタックに子ノードuを積む
print(*cnt[1:]) #各頂点のcountが答えとなる

Buggy submission (verdict: Runtime Error):
#include<algorithm>
#include <iostream>
#include<vector>
#include<string>
#include <iomanip>
#include <queue> 
using namespace std;

int main(){
    int n,Q;
    cin>>n>>Q;

    vector<vector<int>> adj(n+1);

    for(int i=1;i<n;i++){
        int p,c;
        cin>>p>>c;
        adj[p].push_back(c);
    }

    vector<long long> cost(n+1,0);

    for(int i=0;i<Q;i++){
        int v,c;
        cin>>v>>c;
        cost[v] += c;
    }

    queue <int> q;

    int a = 0;
    for(int i=0;i<adj.size();i++)
        if(adj[i].size()>0){
            a=i;
            break;
        }
    q.push(a);
    // vector<bool> vis(n+1,0);
    // vis[a] = 1;
    while(!q.empty()){
        int nc = q.size();
        
        while(nc>0){
            int pa = q.front();
            q.pop();
            nc--;
            long long pc = cost[pa];
            for(int i=0;i<adj[pa].size();i++){
                
                    // vis[adj[pa][i]]==1;
                    q.push(adj[pa][i]);
                    cost[adj[pa][i]] += pc;
                
            }
        }
    }

    for(int i=1;i<n+1;i++)
        cout<<cost[i]<<" ";
    cout<<endl;
}
Problem p02981 (python)

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

if n*a < b:
  print(n*a)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())

if n*a < b:
  print(na)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())

if na < b:
  print(na)
  else:
    print(b)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())

print(na if na< b else: b)
Problem p03035 (python)

Fixed submission:
A,B = map(int,input().split())


if A >= 13:
    print(B)

elif A >= 6 and A <= 12:
    print(int(B/2))

else:
    print(0)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())

if A >= 13:
    print(B)

elif A >= 6 and A <= 12:
    print(B/2)

elif A <= 5
    print(0)
Problem p03206 (python)

Fixed submission:
D = int(input())
if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
elif D == 22:
    print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
D = (int,input()
if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')
Problem p03773 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print("%d" % ((A+B)%24))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
N, A, B = map(int, input().split())
V = list(map(int, input().split()))
V.sort(reverse=True)
maxavg = sum(V[:A])/A
print(maxavg)
min = V[A-1]
ltAnum = 0
minnum = 0
for i in range(N):
    if V[i] > min:
        ltAnum = ltAnum + 1
    elif V[i] == min:
        minnum = minnum + 1
    else:
        break
#print(ltAnum)
#print(minnum)

import math
def nCr(n,r):
    f = math.factorial
    return f(n)//f(r)//f(n-r)

c_min = 0
import itertools
if ltAnum > 0:
    c_min = nCr(minnum, A-ltAnum)
if ltAnum == 0:
    for j in range(A, B+1):
        if minnum < j:
            break
        else:
            c_min = c_min + nCr(minnum, j)
print(c_min)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N, M = map(int, input().split())
students = []
checkpoints = []
for i in range(N):
    students.append(list(map(int, input().split())))
#print(students)
for i in range(M):
    checkpoints.append(list(map(int, input().split())))
#print(checkpoints)
for i in range(N):
    mincp = -1
    mindist = -1
    for j in range(M):
        dist = abs(students[i][0]-checkpoints[j][0]) + abs(students[i][1]-checkpoints[j][1])
        if mincp == -1:
            mincp = j
            mindist = dist
        else:
            if dist < mindist:
                mindist = dist
                mincp = j
    print("%d" % (mincp+1))
Problem p03777 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = input().split()
if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import itertools
N, K = map(int, input().split())
A = list(map(int, input().split()))
unnec = 0
for i in range(0,N):
    B = list(A)
    v = B.pop(i)
    nec = False
    for j in range(len(B),0,-1):
        for l in list(itertools.combinations(B,j)):
            s = sum(l)
            #print("%s, %d, %d" % (str(l), s, v))
            if s >= K:
                continue
            elif s + v >= K:
                nec = True
                break
        if nec == True:
            break
    if nec == False:
        unnec = unnec + 1
print(unnec)
Problem p02957 (python)

Fixed submission:
ab = input().split()
a = int(ab[0])
b = int(ab[1])
 
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

main()

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Buggy submission (verdict: Runtime Error):
ab = input().split()
a = ab[0]
b = ab[1]

if (a + b) % 2 == 0:
  print (a + b) // 2
else:
  "IMPOSSIBLE"
Problem p02958 (python)

Fixed submission:
if __name__ == '__main__':
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Buggy submission (verdict: Runtime Error):
    n = int(input()
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input()
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")
Problem p02952 (python)

Fixed submission:
n=input()
l=len(n)
a="090909"[:l]
print(a[1:] if l %2 ==0 else int(n)-int(a))

Buggy submission (verdict: Runtime Error):
n=input()
l=len(n)
a="90909"[:l-1]
print(a if l %2 ==0 else int(n)-int(a))
Problem p02934 (python)

Fixed submission:
N = int(input())
arr = input()

hoge = arr.split(" ")

mother = 0
for i in hoge:
  mother = mother + 1 / int(i) 

print(1/mother)

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = input()

mother = 0
for i in arr:
  if i != " ":
  	mother = mother + 1 / int(i) 

print(1/mother)
Problem p03212 (python)

Fixed submission:
def listup(number, n):

    if number > 10 ** 9:
        return
    else:
        number = 10 * number + n
        if "7" in str(number):
            if "5" in str(number):
                if "3" in str(number):
                    list753.append(number)
        listup(number, 3)
        listup(number, 5)
        listup(number, 7)

list753 = []
ans = 0
N = int(input())
listup(0, 0)
for i in range(len(list753)):
    if N - list753[i] >= 0:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = input()
N = int(n)

a = int((n[-3:]))

y = 0
if a >= 753:
    x = 6
elif a >= 735:
    x = 5
elif a >= 573:
    x = 4
elif a >= 537:
    x = 3
elif a >= 375:
    x = 2
elif a >= 357:
    x = 1
elif a < 356:
    x =0

for i in range(0, len(n)-3):
    if int(n[i]) == 0:
        y = y
    elif int(n[i]) >=7:
        y += (len(n) - i) * 3 - 9
    elif int(n[i]) >=5:
        y += (len(n) - i) * 3 - 10
    elif int(n[i]) >= 3:
        y += (len(n) - i) * 3 - 11
    elif int(n[i]) == 2 or 1:
        y += (len(n) - i) * 3 - 12

print(x + y)
Problem p03262 (python)

Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = math.gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    print(ans)
    ans = math.gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    print(ans)
    ans = math.gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)

N, X = input().split(" ")
N = int(N)
X = int(X)
list = input().split(" ")
ans_list = [abs(X - int(list[i])) for i in range(N)]
print(int(gcd(ans_list)))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)

N, X = input().split(" ")
N = int(N)
X = int(X)
list = input().split(" ")
ans_list = [abs(X- int(list[i])) for i in range(N)]
print(gcd(ans_list))
Problem p03854 (python)

Fixed submission:
def DFS(S):
    word_list = [ "dreamer","dream", "eraser", "erase"]
    stack = ["dream", "dreamer", "erase", "eraser"]
    while stack:
        word = stack.pop()
        if word == S[0]:
            return "YES"
        for i in word_list:
            next_word = word + i
            check = S[0][:len(word + i)]
            if next_word != check:
                continue
            if next_word == check:
                stack.append(next_word)
    return "NO"






if __name__ == "__main__":
    S = [input()]
    print(DFS(S))

Buggy submission (verdict: Runtime Error):
from collections import deque
def DFS(S):
    word_list = ["dream", "dreamer", "erase", "eraser"]
    stack = deque(word_list)
    while stack:
        print(stack)
        word = stack.pop()
        if word == S[0]:
            return "Yes"
        for i in word_list:
            next_word = word + i
            check = S[0][:len(word + i)]
            if next_word != check:
                continue
            if next_word == check:
                stack.append(next_word)
    return "NO"






if __name__ == "__main__":
    S = [input()]
    print(DFS(S))
Problem p03433 (python)

Fixed submission:
n,a = map(int,open(0).read().split())
print("Yes" if n%500 <= a else "No")

Buggy submission (verdict: Runtime Error):
n,a = map(int,open(0).read())
print("Yes" if n%500 <= a else "No")
Problem p03673 (python)

Fixed submission:
n = int(input())
a = input().split()
print(' '.join(a[::-2] + a[n%2::2]))

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

Buggy submission (verdict: Runtime Error):
n, *a = map(int, open(0).read().split())
print(*a[::-2], *a[n%2::2])
Problem p02945 (python)

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

print(max(a+b,a-b,a*b))

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

print(max(a+b,a-b,a*b))

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

print(max(a+b,a-b,a*b))
Problem p02957 (python)

Fixed submission:
a, b = map(int, input().split())
if abs(b+a) % 2 == 0:
    print(abs(a+b)//2)
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
a,b = map(int, imput().split())
 
if abs(a+b)%2 ==0:
    print(abs(a+b)//2)
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
a,b = map(int, imput().split())

if (a+b)%2 ==0:
    print(abs((a+b)//2))
else:
    print('IMPOSSIBLE')
Problem p02993 (python)

Fixed submission:
s = input()

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
s = input()

if s[0] == s[1] or s[1] == s[2] or s[2] == pas[3]:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
s = input()

if pas[0] == pas[1] or pas[1] == pas[2] or pas[2] == pas[3]:
    print('Bad')
else:
    print('Good')
Problem p03059 (python)

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

print(int((t+0.5)//a*b))

Buggy submission (verdict: Runtime Error):
import itertools
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

lv = []
lc = []
diff = []
for i in range(1,n+1):
    for p in itertools.combinations(v,i):
        lv.append(sum(p))
    for p in itertools.combinations(c,i):
        lc.append(sum(p))
for i in range(len(lv)):
    diff.append(lv[i]-lc[i])
print(0 if max(diff)<0 else max(diff))
Problem p03060 (python)

Fixed submission:
n = int(input())
lv = list(map(int, input().split()))
lc = list(map(int, input().split()))

ans = 0
for i in range(n):
    ans += max(lv[i] - lc[i], 0)
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
lv = []
lc = []
diff = []
for i in range(1,n+1):
    for p in itertools.combinations(v,i):
        lv.append(sum(p))
    for p in itertools.combinations(c,i):
        lc.append(sum(p))
for i in range(len(lv)):
    diff.append(lv[i]-lc[i])
print(0 if max(diff)<0 else max(diff))
Problem p03219 (python)

Fixed submission:
x, y = map(int, input().split())

print(x + y//2)

Buggy submission (verdict: Runtime Error):
import sys

x = sys.argv[1]
y = sys.argv[2]

a_to_b = int(x)
b_to_c = int(y) / 2

print(a_to_b + b_to_c)

Buggy submission (verdict: Runtime Error):
import sys

x = sys.argv[1]
y = sys.argv[2]

a_to_b = int(x)
b_to_c = int(y) / 2

print(a_to_b + b_to_c)

Buggy submission (verdict: Runtime Error):
import sys

x = sys.argv[1]
y = sys.argv[2]

a_to_b = x
b_to_c = y/2

print(a_to_b + b_to_c)
Problem p03323 (python)

Fixed submission:
a, b  = input().split()

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

Buggy submission (verdict: Runtime Error):
a, b  = raw_input().split()

if int(a) > 8 or int(b) > 8:
    print(":(")
else:
    print("yay!")
Problem p03324 (python)

Fixed submission:
d, n  = map(int, input().split())

if d == 0:
    if n == 100:
        print(101)
    else:
        print(1 * n)
if d == 1:
    if n == 100:
        print(10100)
    else:
        print(100 * n)
if d == 2:
    if n == 100:
        print(1010000)
    else:
        print(10000 * n)

Buggy submission (verdict: Runtime Error):
d, n  = map(int, input().split())

if d == 0:
    if n == 100:
        print 101
    else:
        print(1 * n)
if d == 1:
    if n == 100:
        print 10001
    else:
        print(100 * n)
if d == 2:
    if n == 100:
        print 1000001
    else:
        print(10000 * n)

Buggy submission (verdict: Runtime Error):
d, n  = map(int, input().split())

if d = 0:
    print(1 * n)
if d = 1:
    print(100 * n)
if d = 2:
    print(10000 * n)
Problem p03852 (python)

Fixed submission:
c = raw_input()
vowel = ("a", "i", "u", "e", "o")

if c in vowel:
        print "vowel"
else:
        print "consonant"

Buggy submission (verdict: Runtime Error):
import sys

c = sys.argv[1]
vowel = ("a", "i", "u", "e", "o")

if c in vowel:
        print "vowel"
else:
        print "consonant"
Problem p02946 (python)

Fixed submission:
max_num = 1000000
min_num = -1000000
k,x = map(int, input().split())
if x + k > 1000000:
    min_num = x - k + 1
elif x - k < -1000000:
    max_num = x + k - 1
else:
    min_num = x - k + 1
    max_num = x + k - 1

ans = ""
for i in range( min_num, max_num + 1 ):
    ans = ans + str(i) + " "

print( ans )

Buggy submission (verdict: Runtime Error):
max_num = 1000000
min_num = -1000000
k,x = map(int, input().split())
if x + k > 1000000:
    min_num = x - k
elif x - k < -1000000:
    max_num = x + k
else:
    min_num = x - k
    max_num = x + k

for i range( min_num, max_num ):
    print i