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

Fixed submission:
a=input().strip().split()
b=[int(i) for i in a]

if (b[0] > b[2]):
	print("NO")
elif(b[0]+b[1])>b[2]:
	print("YES")
else:
	print("NO")

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

if (a > x):
	print("No")
elif(a+b)>x:
	print("Yes")
else:
	print("No")
Problem p03494 (python)

Fixed submission:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
  ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans)

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
  ans = min(ans, len(bin(i)) - bin(i).rfing("1") - 1)
print(round(ans)
Problem p03434 (python)

Fixed submission:
N = int(input())
cards = list(map(int, input().split()))
cards.sort(reverse=True)
print(sum(cards[0::2]) - sum(cards[1::2]))

Buggy submission (verdict: Runtime Error):
N = int(input())
cards = list(map(int, input().split()))
l.sort(reverse=True)
print(sum(cards[0::2]) - sum(cards[1::2]))
Problem p03636 (python)

Fixed submission:
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
print(s[0] + len(s[1:-1]) + s[-1])
Problem p03433 (python)

Fixed submission:
pay = int(input(''))
yen1 = int(input(''))
amari = pay % 500
if yen1 >= amari:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
pay = input('')
yen1 = input('')
amari = pay % 500
if yen1 >= amari:
  print('YES')
else:
  print('NO')
Problem p03478 (python)

Fixed submission:
N, A, B = list(map(int, input('').split()))
total = 0
for x in range(1, N + 1):
  num = str(x)
  digit_total = 0
  for y in range(len(num)):
    digit_total += int(num[y])
  if digit_total >= A and digit_total <= B:
    total += x

print(total)

Buggy submission (verdict: Runtime Error):
N, A, B = list(map(int, input('').split()))
answer = 0
for x in range(1, N + 1):
  total = sum(map(int, list(str(x)))
  if A <= total <= B:
    answer += x

print(answer)
Problem p03485 (python)

Fixed submission:
import math

digits = input('')
digits = digits.split(' ')
average = math.ceil((int(digits[0]) + int(digits[1])) / 2)
print(average)

Buggy submission (verdict: Runtime Error):
digits = input('')
digits = digits.split(' ')
average = math.round(int(digits[0]) + int(digits[1]) / 2)
print(average)
Problem p03486 (python)

Fixed submission:
first = sorted(list(input('')))
second = sorted(list(input('')), reverse=True)
length = len(first) < len(second)

result = False
check_equal = False
for (f, s) in zip(first, second):
  check_equal = (s == f)
  if f < s:
    result = True
    break
  elif f > s:
    result = False
    break

if (length and check_equal) or result:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
first = sorted(list(input('')))
second = sorted(list(input('')), reverse=True)
length = len(first) < len(second)

result = False
check_equal = False
for (f, s) in zip(first, second):
  check_equal = (s == f)
  if !check_equal:
    result = (f < s)
    break

if (length and check_equal) or result:
  print('Yes')
else:
  print('No')
Problem p03493 (python)

Fixed submission:
digits = list(input(''))
count = 0
if digits[0] == '1':
  count += 1
if digits[1] == '1':
  count += 1
if digits[2] == '1':
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
digits = input('')
count = 0
if digits[0] == 1:
  count++
if digits[1] == 1:
  count++
if digits[2] == 1:
  count++
print count
Problem p03636 (python)

Fixed submission:
input_str = input('')
start = input_str[:1]
end = input_str[-1:]
print(start + str((len(input_str) - 2)) + end)

Buggy submission (verdict: Runtime Error):
str = input('')
start = str[:1]
end = str[-1:]
print(start + (len(str) - 2) + end)
Problem p03693 (python)

Fixed submission:
digits = input('')
digits = digits.split(' ')
if int(''.join(digits)) % 4 == 0:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
digits = input('')
if int(digits) % 4:
  print 'YES'
else:
  print 'NO'
Problem p03369 (python)

Fixed submission:
a=input()
print(700+a.count("o")*100)

Buggy submission (verdict: Runtime Error):
a=int(input())
print(700+a.count("o")*100)
Problem p03377 (python)

Fixed submission:
A,B,X = (int(i) for i in input().split())
 
if (X>=A and X<=(A+B)):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,X = map(int, input().sp;it())
 
if (X>=A and X<=(A+B)):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int, input.split())
print("YES" if a<=c<=a+b else "NO")
Problem p03385 (python)

Fixed submission:
print("Yes" if len(set(input())) == 3 else "No")

Buggy submission (verdict: Runtime Error):
x=input()
x.solt()
if x=="abc":
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
x=input()
x.solt()
if x==abc:
	print("YES")
else:
	print("NO")
Problem p03399 (python)

Fixed submission:
a=[]
for _ in range(4):
	a.append(int(input()))

print(min(a[0],a[1])+min(a[2],a[3]))

Buggy submission (verdict: Runtime Error):
a=[]
for _ in range(4):
	a.append(int(input())

print(min(a[0],a[1])+min(a[2],a[3]))

Buggy submission (verdict: Runtime Error):
N=int.input()
a=[int.input() for i in range(2)]
M=int.input()
b=[int.input() for i in range(2)]
print(min(a)+min(b))
Problem p03407 (python)

Fixed submission:
a,b,c=map(int,input().split())
print("Yes" if a+b>=c else "No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print("YES" if a[0)+a[1]>=a[3] else "NO")

Buggy submission (verdict: Runtime Error):
a=map(int,input().split())
print("YES" if a[0)+a[1]>=a[3] else "NO")

Buggy submission (verdict: Runtime Error):
a=map(int, input().split)
print("YES" if a[0)+a[1]>=a[3] else "NO")
Problem p03369 (python)

Fixed submission:
S = list(input())
S = [100 for s in S if s == 'o']
print(700+sum(S))

Buggy submission (verdict: Runtime Error):
N, X = input().strip().split()
N = int(N)
X = int(X)
donuts = sorted(int(input()) for i in range(N-1))
partial_sum = [sum(donuts[:i]) for i in range(N-1)]
if partial_sum[-1] > X:
    print(N-1 + (X-partial_sum[-1]) // donuts[0])
else:
    print(sum(1 for x in partial_sum if x <= X))
Problem p03557 (python)

Fixed submission:
N = int(input().rstrip())
A = sorted(list(map(int, input().rstrip().split())))
B = sorted(list(map(int, input().rstrip().split())))
C = sorted(list(map(int, input().rstrip().split())))

import bisect
upper_condition = [bisect.bisect_left(A, b) for b in B]
lower_condition = [N - bisect.bisect_right(C, b) for b in B]

print(sum(map(lambda x: x[0]*x[1], zip(upper_condition, lower_condition))))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(sorted(map(int, input().split())))
B = list(sorted(map(int, input().split()))
C = list(sorted(map(int, input().split())))
 
import bisect
upper_condition = [bisect.bisect_left(A, b) for b in B]
lower_condition = [N - bisect.bisect_right(C, b) for b in B]
 
print(sum(map(lambda x: x[0]*x[1], zip(upper_condition, lower_condition))))

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

import bisect
upper_condtion = [bisect.bisect_left(A, b) for b in B]
lower_condition = [N - bisect.bisect_right(C, b) for b in B]

print(sum(map(lambda x: x[0]*x[1], zip(upper_condition, lower_condition))))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = np.array(list(sorted(map(int, input().split()))), dtype=int)
B = np.array(list(sorted(map(int, input().split()))), dtype = int)
C = np.array(list(sorted(map(int, input().split()))), dtype = int)
 
upper_condition = np.array([1 + np.max(np.where(A < b)[0]) for b in B])
lower_condition = np.array([N - np.min(np.where(C > b)[0]) for b in B])
 
print(np.sum(upper_condition*lower_condition))
Problem p03369 (python)

Fixed submission:
if __name__ == '__main__':
    s = input()
    t = list(s).count('o')
    v = 700 + 100 * t
    print(v)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    s = raw_input()
    t = list(s).count('〇')
    v = 700 + 100 * t
    print(v)
Problem p03369 (python)

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

option = input()
print (700 + 100 * option.count('o'))

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
M = [int(input()) for _ in range(N)]
 
x = X - sum(M)
m = min(M)
print(N + x // m)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N, X = map(int, input().split())
M = [int(input()) for _ in range(N)]
 
x = X - sum(M)
m = min(M)
 
print (N + x // m)
Problem p03370 (python)

Fixed submission:
N, X = map(int, input().split())
M = [int(input()) for _ in range(N)]
 
x = X - sum(M)
m = min(M)
print(N + x // m)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N, X = map(int, input().split())
M = [int(input()) for _ in range(N)]
 
x = X - sum(M)
m = Min(M)
 
print (N + x // m)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N, X = map (int, input().split())
M = [int(input()) for _ in range(N)]

x = X - sum(M)
m = Min(M)

print (N + x // m)
Problem p03377 (python)

Fixed submission:
A,B,X = map(int, input().split())
if A + B >= X and A <= X:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
list = list(map(int,input().split()))
#print(list)
sa_list = []
ai = max(list)
for i in range(N):
    sa2 = abs(( list[i] - ai/2 ) *2)
    
   #print(sa)
    sa_list.append(int(sa2))
#print(sa_list)
basyo = (sa_list.index(min(sa_list)))
ar = list[basyo]
if ai == ar:
    print(str(ai) + " " + str(ai - ar))
else:
    print(str(ai) + " " + str(ar))
Problem p04043 (python)

Fixed submission:
n = list(map(int,input().split()))
if 5 in n:
    n.remove(5)
    if 5 in n and 7 in n :
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))
if 5 in n :
    n.remove(5)
    if 5 in n and if 7 in n :
        print("YES")
    else:
        print("NO")
else :
    print("NO")

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))
if 5 in n :
    n.remove(5)
    elif 5 in n :
        elif 7 in n :
            print("YES")
else :
    print("NO")

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))
if 5 in n :
    n.remove(5)
    elif 5 in n :
        elif 7 in n :
                print("YES")
else :
    print("NO")

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))
if 5 in n :
    n.remove(5)
    elif 5 in n :
        elif 7 in n :
                print("YES")
else :
    print("NO")
Problem p04047 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
l.sort()
sum=0
for x in range(0,n*2,2):
    sum+=min(l[x:x+2])
print(sum)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
l.sort()
sum=0
for x in range(0,n*2+1,2):
    sum+=min(l[x:x+2])
print(sum)
Problem p03377 (python)

Fixed submission:
A, B, X=list(map(int,input().split()))
if B>=X-A&X-A>=0:
     print("YES")
else:
     print("NO")

Buggy submission (verdict: Runtime Error):
A, B, X=list(map(int,input().split()))
if B>=X-A&X-A>=0:
 　print("YES")
else:
    print("NO")
Problem p03369 (python)

Fixed submission:
a=input()
sum=700
for i in a:
    if i=='o':
        sum+=100
print(sum)

Buggy submission (verdict: Runtime Error):
a=inout().split(' ')
n=int(a[0])
sum=int(a[1])
b=9999999
for i in range(n):
    c=int(input())
    sum-=c
    if b>c:
        b=c
print(sum//b)
Problem p03370 (python)

Fixed submission:
a=input().split(' ')
n=int(a[0])
sum=int(a[1])
b=9999999
for i in range(n):
    c=int(input())
    sum-=c
    if b>c:
        b=c
print(n+sum//b)

Buggy submission (verdict: Runtime Error):
a=inout().split(' ')
n=int(a[0])
sum=int(a[1])
b=999999
for i in range(n):
    c=int(input())
    if b>c:
        b=c
print(sum//b)

Buggy submission (verdict: Runtime Error):
a=inout().split(' ')
n=int(a[0])
sum=int(a[1])
b=9999999
for i in range(n):
    c=int(input())
    sum-=c
    if b>c:
        b=c
print(sum//b)

Buggy submission (verdict: Runtime Error):
a=inout().split(' ')
n=int(a[0])
sum=int(a[1])
b=9999999
for i in range(n):
    c=int(input())
    sum-=c
    if b>c:
        b=c
print(sum//b)
Problem p03379 (python)

Fixed submission:


def main():
    N = int(input())
    X = list(map(int, input().split(" ")))

    nums = sorted(X)
    center = len(nums)//2

    dic = {}
    for i,x in enumerate(nums):
        if x not in dic:
            dic[x] = i

    if len(nums)%2 == 0:
        is_even = True
    else:
        is_even = False

    for x in X:
        i = dic[x]
        if is_even:
            if i < center:
                print(nums[center])
            else:
                print(nums[center-1])
        else:
            print(nums[center+1])


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):


def main():
    N = int(input())
    X = list(map(int, input().split(" ")))

    nums = list(set(X))
    lis = [-1]*200001

    for x in X:
        lis[x] += 1

    for x in X:
        if lis[x] < 1:
            ind = nums.index(x)
            edited = nums[:ind] + nums[ind+1:]
            
            print(edited[len(edited)//2])
        else:
            print(nums[len(nums)//2])



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

Fixed submission:
l = list(raw_input())

x1 = 100 if l[0] == "o" else 0
x2 = 100 if l[1] == "o" else 0
x3 = 100 if l[2] == "o" else 0

print 700+ x1 + x2 + x3

Buggy submission (verdict: Runtime Error):
l = raw_input().split()

N = int(l[0])
X = int(l[1])

acc = []

for i in range(N):
    acc.append(int(raw_input()))

acc.sort()
first, rest = acc[0], acc[1:]

priceAmt = reduce(lambda x,y: x+y ,rest)
rem = X - priceAmt

size = rem / first

print size + len(rest)

Buggy submission (verdict: Runtime Error):
l = raw_input().split()

N = int(l[0])
X = int(l[1])

acc = []

for i in range(N):
    acc.append(int(raw_input()))
    print i

acc.sort()
first, rest = acc[0], acc[1:]

priceAmt = reduce(lambda x,y: x+y ,rest)
rem = X - priceAmt

size = rem / first

print size + len(rest)
Problem p03369 (python)

Fixed submission:
def main(func):
    ret=func(input())
    print(ret)


def A(S):
    ret=700
    ret+=S.count("o")*100
    return ret

main(A)

Buggy submission (verdict: Runtime Error):
def C(A,B,C,X,Y):
    both_price=min(A+B,C*2)
    A_price=min(A,C*2)
    B_price=min(B,C*2)

    both_num=min(X,Y)
    X_num=X-both_num
    Y_num=Y-both_num
    return both_price*both_num+X_num*A_price+Y_num*B_price

inp = sys.stdin.read().split()
inp=[int(i) for i in inp]
print(C(inp[0], inp[1], inp[2],inp[3],inp[4],inp[5]))

Buggy submission (verdict: Runtime Error):
def B(N,X,m):
    ret=0
    X-=sum(m)
    ret+=len(m)

    ret+=int(X/min(m))

    return ret

inp = sys.stdin.read().split()
inp=[int(i) for i in inp]
print(B(inp[0], inp[1], inp[2:]))

Buggy submission (verdict: Runtime Error):
def B(N,X,m):
    ret=0
    X-=sum(m)
    ret+=len(m)

    ret+=int(X/min(m))

    return ret

inp = input().split()
inp=[int(i) for i in inp]
print(B(inp[0], inp[1], inp[2:]))

Buggy submission (verdict: Runtime Error):
def B(N,X,m):
    ret=0
    X-=sum(m)
    ret+=len(m)
    
    ret+=int(X/min(m))
    
    return ret

inp=input().split()
print(B(inp[0],inp[1],inp[2:]))
Problem p03371 (python)

Fixed submission:
def parse_input(raw,format):
    raw=raw.split()
    format=format.split()

    ret={}
    rawpos=0
    for f in format:
        pass


def A(S):
    ret=700
    ret+=S.count("o")*100
    return ret

def B(N,X,m):
    ret=0
    X-=sum(m)
    ret+=len(m)

    ret+=int(X/min(m))

    return ret

def C(A,B,C,X,Y):
    both_price=min(A+B,C*2)
    A_price=min(A,C*2)
    B_price=min(B,C*2)

    both_num=min(X,Y)
    X_num=X-both_num
    Y_num=Y-both_num
    return both_price*both_num+X_num*A_price+Y_num*B_price

import sys

inp = sys.stdin.read().split()
inp=[int(i) for i in inp]
print(C(inp[0], inp[1], inp[2],inp[3],inp[4]))

Buggy submission (verdict: Runtime Error):
def C(A,B,C,X,Y):
    both_price=min(A+B,C*2)
    A_price=min(A,C*2)
    B_price=min(B,C*2)
 
    both_num=min(X,Y)
    X_num=X-both_num
    Y_num=Y-both_num
    return both_price*both_num+X_num*A_price+Y_num*B_price
 
inp = sys.stdin.read().split()
inp=[int(i) for i in inp]
print(C(inp[0], inp[1], inp[2],inp[3],inp[4],inp[5]))
Problem p03407 (python)

Fixed submission:
def main():
    A,B,C =list(map(int,input().split()))
    if(C <=(A+B)):
        print("Yes")
    else:
        print("No")



if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    red = []
    for i in range(N):
        x,y = [int(i) for i in input().split()]
        red.append([x,y])
    blue = []
    for i in range(N):
        x,y = [int(i) for i in input().split()]
        blue.append([x,y])
    red.sort(reverse=True)
    blue.sort(reverse=True)
    #print(red)
    #print(blue)
    pair = 0
    for a in range(N):
        flag = False
        for i in range(N):
            for j in range(N):
                if(red[i][0] <= blue[j][0] and red[i][1] <= blue[j][1]):
                    pair = pair + 1
                    flag = True
                    #print(f'{red[i]} {blue[j]}')
                    blue[j][0] = -10000000000
                    blue[j][1] = -10000000000
                    break
                
        if flag:
            break
    print(pair)
if __name__ == '__main__':
    main()
Problem p03544 (python)

Fixed submission:
import time
import sys

def fib(n):
    memo = [0] * n
    memo[0:2] = [2, 1]
    for i in range(2, n):
        memo[i] = memo[i - 1] + memo[i - 2]
    return memo[i]

def main():
    N = input()
    if(int(N) == 0):
        print(2)
        sys.exit()
    elif(int(N) == 1):
        print(1)
        sys.exit()
    else:
        print(fib(int(N)+1))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import time

def fib(n):
    memo = [0] * n
    memo[0:2] = [2, 1]
    for i in range(2, n):
        memo[i] = memo[i - 1] + memo[i - 2]
    return memo[i]

def main():
    N = input()
    if(N == 0):
        print(2)
    else:
        print(fib(int(N)+1))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import time

def fib(n):
    memo = [0] * n
    memo[0:2] = [2, 1]
    for i in range(2, n):
        memo[i] = memo[i - 1] + memo[i - 2]
    return memo[i]

def main():
    N = input()
    print(fib(int(N)+1))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import time

def fib(n):
    memo = [0] * n
    memo[0:2] = [2, 1]
    for i in range(2, n):
        memo[i] = memo[i - 1] + memo[i - 2]
    return memo[i]

a = input()
print(fib(int(a)+1))

Buggy submission (verdict: Runtime Error):
import time

def fib(n):
    memo = [0] * n
    memo[0:2] = [2, 1]
    for i in range(2, n):
        memo[i] = memo[i - 1] + memo[i - 2]
    return memo[i]

a = input()
print(fib(int(a)+1))
Problem p03369 (python)

Fixed submission:
# -*- coding: utf-8 -*-
s = input()
a = s.count('o')
y = 700 + 100 * a
print(y)

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

x = 700 + 100 * s.count('o')
print(x)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X=0
y=0
z=0
a=0

if 'o' == 'S'[:1] :
   x = 1
    
if 'o' == 'S'[1:2] :
   y = 1
 
if 'o' == 'S'[2:] :
   z = 1
 
a = (7+x+y+z)*100 
 
print(a)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if 'o' == 'S'[:1] :
   x = 1
    
if 'o' == 'S'[1:2] :
   x = x + 1
 
if 'o' == 'S'[2:] :
   x = x + 1
 
y = 700 + x * 100
 
print(y)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if 'o' == 'S'[:1] :
   x = 1
    
if 'o' == 'S'[1:2] :
   x = x + 1
 
if 'o' == 'S'[2:] :
   x = x + 1
 
y = 700 + x * 100
 
print str(y)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if “o” == "S"[:1] :
   x = 1
    
if “o” == "S"[1:2] :
   x = x + 1

if “o” == "S"[2:] :
   x = x + 1

y = 700 + x * 100
 
print str(y)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if “o” == "S"[:1] :
   x = 1
    
if “o” == "S"[1:2] :
   x = x + 1
 
if “o” == "S"[2:] :
   x = x + 1
 
y = 700 + x * 100
 
print str(y)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if “o” == "S"[:1] :
   x = 1
    
if “o” == "S"[1:2] :
   x = x + 1
 
if “o” == "S"[2:] :
   x = x + 1
 
y = 700 + x * 100
 
print str(y)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if “o” == "S"[:1] :
   x = 1
    
if “o” == "S"[1:2] :
   x = x + 1
 
if “o” == "S"[2:3] :
   x = x + 1
 
y = 700 + x * 100
 
print str(y)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
if “o” == s[:1] :
   x = 1
    
if “o” == s[1:2] :
   x = x + 1
 
if “o” == s[2:3] :
   x = x + 1
 
y = 700 + x * 100
 
print str(y)

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

if “o” = s[:1] :
   x = 1
    
if “o” = s[1:2] :
   x = x + 1

if “o” = s[2:3] :
   x = x + 1

y = 700 + x * 100

print str(y)
Problem p03369 (python)

Fixed submission:
S=input()
money=700
counter=0
while counter < S.count("o"):
  money+=100
  counter+=1
print(money)

Buggy submission (verdict: Runtime Error):
S=input()
money=700
for i in S.count("o"):
  money+=100
print(money)

Buggy submission (verdict: Runtime Error):
S=input()
money=700
for i in str.count('o'):
  money+=100
Problem p03369 (python)

Fixed submission:
S = input()
if S.count('o') == 0:
    print(700)
else:
    print(700+(100*S.count('o')))

Buggy submission (verdict: Runtime Error):
import sys
a = []
for line in sys.stdin:
    a.append(int(line))
b = a[0].split()[1]
for i in range(len(a)-1):
    b = b-a[i+1]
print(b[1]/min(a[1:len(a)]))
Problem p03447 (python)

Fixed submission:
import sys
a = []
for line in sys.stdin:
    a.append(int(line))
q = a[0] - a[1]
p = q % a[2]
print(p)

Buggy submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]
l = map(int, a[1].split())
m = map(int, a[2].split())
if a[0] == 1:
  t = l[0] + l[1]
  print(p)
else:
  f = a[0]
  t = 0
  for i in range(len(f-1)):
    t = t + l[i]
  t = t + m[f-1] + m[f]
  print(t)

Buggy submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]
 
l = map(int, a[1].split())
m = map(int, a[2].split())
 
if a[0] == 1:
  t = l[0] + l[1]
  print(p)
  
else:
  f = a[0]
  t = 0
  for i in range(len(f-1)):
    t = t + l[i]
  t = t + m[f-1] + m[f]
  print(t)

Buggy submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]

q = a[0] - a[1]
p = q % a[2]

print(p)

Buggy submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]

q = a[2] - a[0]
p = q % a[1]

print(p)

Buggy submission (verdict: Runtime Error):
N = input()
a = []
for i in range(N):
    a.append(input())

#a[0] + a[1]*x < a[2]

test = a[2] - a[0]

p = test % a[1]

print(p)
Problem p03573 (python)

Fixed submission:
A,B,C = map(int,input().split())
if A == B: print(C)
elif B == C: print(A)
else: print(B)

Buggy submission (verdict: Runtime Error):
t = input().split())

if t[0] == t[1]:
    print(t[2])
elif t[0] == t[2]:
    print(t[1])
else:
    print(t[0])

Buggy submission (verdict: Runtime Error):
if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)
Problem p03597 (python)

Fixed submission:
N = int(input())
A = int(input())
t=N**2-A
print(t)

Buggy submission (verdict: Runtime Error):
N, A = map(int,input().split())
t=N**2-A
print(t)

Buggy submission (verdict: Runtime Error):
N, A = map(int,input().split())
t=N^2-A
print(t)