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

Fixed submission:
x = int(input())

keta = len(str(x))

f = []
for i in range(keta):
    f.append(int(str(x)[i]))
f = sum(f)

if x%f == 0:
    print('Yes')
else:
    print('No')

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

keta = len(str(x))

f = []
for i in range(keta):
    f.append(int(str(x)[i]))
f = sum(f)

if x%f == 0:
    print('Yes')
else:
    print('No')
Problem p03854 (python)

Fixed submission:
s = input()
n_s = len(s)
S = ''
for i in range(n_s):
    S += s[-i-1]
words = ["maerd", "remaerd", "esare", "resare"]
cnt = 0
result = 'YES'
while True:
    if S[cnt:cnt+5] == 'maerd':
        cnt += 5
    elif S[cnt:cnt+5] == 'esare':
        cnt += 5
    elif S[cnt:cnt+6] == 'resare':
        cnt += 6
    elif S[cnt:cnt+7] == 'remaerd':
        cnt += 7
    else:
        result = 'NO'
        break
    if cnt == n_s:
        break
print(result)

Buggy submission (verdict: Runtime Error):
s = input()
n_s = len(s)
S = ''
for i in range(n_s):
    S += s[-i-1]
words = ["maerd", "remaerd", "esare", "resare"]
cnt = 0
result = 'Yes'
while True:
    if S[cnt:cnt+5] == 'maerd':
        cnt += 5
    elif S[cnt:cnt+5] == 'esare':
        cnt += 5
    elif S[cnt:cnt+6] == 'resare':
        cnt += 6
    elif S[cnt:cnt+7] == 'remaerd':
        cnt += 7
    else:
        result = 'No'
        break
    if cnt == n_S:
        break
print(result)
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
print((a + b) * h // 2)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

def inside(x, y):    
    return 0 <= x <= h - 3 and 0 <= y <= w - 3

h, w, n = (int(_) for _ in input().split())
black = defaultdict(int)
for i in range(n):
    a, b = (int(_) - 1 for _ in input().split())
    for j in range(3):
        for k in range(3):
            x, y = a - j, b - k
            if not inside(x, y):
                continue
            black[(x, y)] += 1
ans = [0 for i in range(10)]
ans[0] = (h-2)*(w-2) - len(black)
for k in black:
    ans[black[k]] += 1
for i in range(10):
    print(ans[i])
Problem p03351 (python)

Fixed submission:
repo = list(map(int, input().split()))

if(abs(repo[2]-repo[0])<repo[3]*2):
    print('Yes')
else:
    print('No')

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

if(abs(c-a)<d*2):
    print("Yes")
else:
    print("No")
Problem p03353 (python)

Fixed submission:
s = input()
k = int(input())
l = []
for i in range(1,k+1):
    for j in range(len(s)-i+1):
        l.append(s[j:j+i])


l = list(set(l))
l.sort()
print(l[k-1])

Buggy submission (verdict: Runtime Error):
s = input()
k = int(input())
l = []
for i in range(1,k):
    for j in range(len(s)-i+1):
        l.append(s[j:j+i])


l = list(set(l))
l.sort()
print(l[k-1])
Problem p03377 (python)

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

if a<=x<=a+b:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 17 14:45:17 2018

@author: kitamura
"""

N = int(input())
X = list(map(int, input().split()))

for i in range(N):
    M=[]
    for j in range(N):
        if j==i:
            continue
        M.append(X[j])
    M.sort()
#    print(M)
    print(M[(int(N/2))-1])
Problem p03351 (python)

Fixed submission:
"""
TODO
"""


def talkable(a, b, c, d):
    if abs(a - c) <= d:
        return True

    if abs(a - b) <= d:
        if abs(b - c) <= d:
            return True

    return False


if __name__ == "__main__":
    a, b, c, d = map(int, input().rstrip().split(' '))
    if talkable(a, b, c, d):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
"""
TODO
"""


def substring(s):
    ss = []
    max_ss = len(s) + 1
    for ss_len in range(1, max_ss):
        max_ofs = max_ss - ss_len
        for ofs in range(0, max_ofs):
            c = s[ofs:ss_len + ofs]
            ss.append(c)
    ss = list(set(ss))
    return sorted(ss)


def nth_largest(s, n):
    ss = substring(s)
    return ss[n - 1]


if __name__ == "__main__":
    s = input().rstrip()
    K = int(input().rstrip())
    print(nth_largest(s, K))

Buggy submission (verdict: Runtime Error):
"""
TODO
"""
import sys


def substring(s):
    ss = []
    max_ss = len(s) + 1
    for ss_len in range(1, max_ss):
        max_ofs = max_ss - ss_len
        for ofs in range(0, max_ofs):
            c = s[ofs:ss_len + ofs]
            ss.append(c)
    ss = list(set(ss))
    return sorted(ss)


def nth_largest(s, n):
    ss = substring(s)
    return ss[n - 1]


if __name__ == "__main__":
    s = input().rstrip()
    K = int(input().rstrip())
    print(nth_largest(s, K))
Problem p03369 (python)

Fixed submission:
s = input()
count = 0
for i in range(3):
    if 'o' in s[i]:
        count += 1
print(700 + count * 100)

Buggy submission (verdict: Runtime Error):
A, B, C, X, Y = map(int, input().split(' '))
ans = A * X + B * Y
for k in range(1, max(X, Y) + 1):
    _ans = 2 * C * k + max(X - k, 0) * A + max(Y - k, 0) * B
    if _ans < ans:
        ans = _ans
print(ans)
Problem p03353 (python)

Fixed submission:
str = input()
k = int(input())
 
substr = []
for i in range(len(str)):
  substr.extend([str[i:j] for j in range(i+1,i+6)])
 
substr = list(set(substr))
substr.sort()
print(substr[k-1])

Buggy submission (verdict: Runtime Error):
str = input()
k = int(input())

substr = []
for i in range(len(str)):
  substr.extend([str[i:j] for j in range(i+1,len(str) + 1)])

substr = list(set(substr))
substr.sort()
print(substr[k-1])
Problem p03377 (python)

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

if (a > x) or (a + b < x):
    print('NO')
else:
    print('YES')

Buggy submission (verdict: Runtime Error):
l = input().split()
n = int(l[0])
m = int(l[1])
x = int(l[2])
a = input().split()
i = 0
while(1):
    if int(a[i]) > x:
        break
    i = i + 1
if i < m - i:
    print(i)
else:
    print(m - i)
Problem p03351 (python)

Fixed submission:
import sys
tmp=input().split()
a=int(tmp[0])
b=int(tmp[1])
c=int(tmp[2])
d=int(tmp[3])
da=a-b
db=b-c
dc=c-a
if a-b<0:
    da=b-a
if b-c<0:
    db=c-b
if c-a<0:
    dc=a-c
if dc<=d or da<=d and db<=d:
    print('Yes')
    sys.exit()
print('No')

Buggy submission (verdict: Runtime Error):
tmp=input().split()
a=int(tmp[0])
b=int(tmp[1])
c=int(tmp[2])
d=int(tmp[3])
Flag=False
ta=b-a
tb=c-b
tc=c-a
if ta<0:
    ta=ta*(-1)
if tb<0:
    tb=tb*(-1)
if tc<0:
.    tc=tc*(-1)
if tc<=d:
    Flag=True
if ta<=d and tb<=d:
    Flag=True
if Flag:
    print('Yes')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
import sys
tmp=input().split()
a=int(tmp[0])
b=int(tmp[1])
c=int(tmp[2])
d=int(tmp[3])
da=a-b
db=b-c
dc=c-a
if a-b<0:
    da=b-a
if b-c<0:
    db=c-b
if c-a<0:
    dc=a-c
if dc<=d or da<=d and db<d
    print('Yes')
    sys.exit()
print('No')

Buggy submission (verdict: Runtime Error):
tmp=int(input().split())
a=tmp[0]
b=tmp[1]
c=tmp[2]
d=tmp[3]
Flag=False
if (c-a)<d or (a-c)<d:
    Flag=True
if ((b-a)<d or (a-b)<d)and((c-b)<d or(b-c)<d):
    Flag=True
if Flag:
    print('Yes')
else:
    print('NO')
Problem p03399 (python)

Fixed submission:
pay = [int(input()) for i in range(4)]
# print(pay)
if(pay[0] < pay[1]):
    train = pay[0]
else:
    train = pay[1]
    
if(pay[2] < pay[3]):
    bus = pay[2]
else:
    bus = pay[3]

print("{0}".format(train + bus))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
a.append(0)
pay = [0] * N
flag = True

for i in range(N):
    if(flag == False):
           flag = True
    for j in range(N + 1):
        if(flag == False):
           flag = True
           continue

        if(i == N - j - 1):
            if(N - j - 2 >= 0):
                pay[i] += abs(a[N - j] - a[N - j - 2])
                flag = False
            else:
                pay[i] += abs(a[N - j])
                flag = False
        else:
            if(N - j - 1 >= 0):
                pay[i] += abs(a[N - j] - a[N - j - 1])
            else:
                pay[i] += abs(a[N - j])
    
for i in range(N):
    print("{0}".format(pay[i]))
Problem p03351 (python)

Fixed submission:
def ColorfulTransceivers():
    
    def checker(number):
        return (number<1 or number>100)
    
    raw = input()
    input_list = raw.split(" ")
    try :
        [a,b,c,d] = [int(i) for i in input_list]
    except ValueError:
        return("Oops!  There is no int input.")
    if (sum([checker(i) for i in [a,b,c,d]])): 
        return("Oops!  There is no validate data.")
    elif abs(c-a)<=d:
        print("Yes")
    elif abs(b-a)<=d and abs(c-b)<=d:
        print("Yes")
    else:
        print("No")

ColorfulTransceivers()

Buggy submission (verdict: Runtime Error):
def Exponential():
    X = int(input())
    res=1
    for b in range(1, X+1):
        for p in range(2, int(X/2)+1, 1): 
            if b**p >X: break
            else:
                res = max(b**p, res)
    print(res)
Exponential()
Problem p03351 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
dis_ab = abs(a-b)
dis_bc = abs(b-c)
dis_ac = abs(a-c)

if dis_ab <= d and dis_bc <= d:
  print('Yes')
elif dis_ac <= d:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a b c d = map(int,input().split())
dis_ab = abs(a-b)
dis_bc = abs(b-c)
 
if dis_ab <= d and dis_bc <= d:
  print('Yes')
else:
  print('No')
Problem p03369 (python)

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

Buggy submission (verdict: Runtime Error):
A, B, C, X, Y = map(int, input().split())
l = 0;
d = C - 0.5*A - 0.5*B
if(d<0):
    l=min(2*X, 2*Y)
else:
    l=0
print(str(int(A*X + B*Y + d*l)))
Problem p03351 (python)

Fixed submission:
ls = list(map(lambda x: int(x), input().split()))
if abs(ls[0] - ls[2]) <= ls[3] or (abs(ls[0] - ls[1]) <= ls[3] and abs(ls[1] - ls[2]) <= ls[3]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import math

print(int(math.sqrt(int(input())))**2)
Problem p03351 (python)

Fixed submission:
s= input().split()
ab=abs(int(s[0])-int(s[1]))
bc=abs(int(s[1])-int(s[2]))
ac=abs(int(s[0])-int(s[2]))

if ac<=int(s[3]):
  print("Yes")
else:
  if ab<=int(s[3]) and bc<=int(s[3]):
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
def main:
  s= raw_input().split()
  ab=abs(s[0]-s[1])
  bc=abs(s[1]-s[2])
  ac=abs(s[0]-s[2])
  
  if ac<=s[3]:
    print("Yes")
  else:
    if ab<=s[3] and bc<=s[3]:
      print("Yes")
    else:
      print("No")
Problem p03353 (python)

Fixed submission:
s = input()
n = input()
ans = set([])
test = list(s)

for i in range(len(test)):
    s = test[i]
    ans.add(s)
    for j in range(i+1, min(i+5, len(test))):
        s = s + test[j]
        ans.add(s)
    
ans = list(ans)

ans.sort()
print(ans[int(n)-1])

Buggy submission (verdict: Runtime Error):
s = input()
n = input()
ans = set([])
test = list(s)

for i in range(len(test)):
    s = test[i]
    ans.add(s)
    for j in range(i+1, min(i+5, len(test)):
        s = s + test[j]
        ans.add(s)
    
ans = list(ans)

ans.sort()
print(ans)
print(ans[int(n)-1])
Problem p03597 (python)

Fixed submission:
if __name__ =='__main__':
    N = int(input())
    A = int(input())
    ans = N**2-A
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
    N = int(input())
    K = int(input())
    x = list(map(int, input().split()))
    ans = 0
    for i in range(N):
        r = min(x[i],abs(K-x[i]))
        ans += 2*r
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N = input()
    A = input()
    ans = N**2-A
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ input()
    A = input()
    ans = N**2 - A
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ input()
    A = input()
    ans = N**2 - A
    print ans

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ input()
    A = input()
    ans = N**2 - A
    print ans

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ input()
    A = input()
    ans = N**2 - A
    print ans

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ input()
    A = input()
    ans = N**2 - A
    print ans

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ raw_input()
    A = raw_input()
    ans = N**2 - A
    print ans

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ raw_input()
    A = raw_input()
    ans = N**2 - A
    return N-A

Buggy submission (verdict: Runtime Error):
if __name__ =='__main__':
    N ＝ raw_input()
    A = raw_input()
    N = N**2
    return N-A
Problem p03598 (python)

Fixed submission:
if __name__ == "__main__":
    N = int(input())
    K = int(input())
    x = list(map(int, input().split()))
    ans = 0
    for i in range(N):
        r = min(x[i],abs(K-x[i]))
        ans += 2*r
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
    N = int(input())
    K = int(input())
    x = map(int, input().split())
    ans = 0
    for i in range(N):
        r = min(x[i],abs(K-x[i]))
        ans += 2*r
    print(ans)
Problem p03605 (python)

Fixed submission:
if __name__ == '__main__':
    i = 0
    N = int(input())
    if N-90>0:
        i = 1
    x = (N-9)/10
    if x == int(x):
        i = 1
    if i == 1:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    i = 0
    N = int(input())
    if N-90>0:
        i = 1
    x = (N-9)/10
    if x == int(x):
        i = 1
    if i == 1:
        print(Yes)
    else:
        print(No)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    N = int(input())
    if N-90>0:
        i = 1
    x = (N-9)/10
    if x == int(x):
        i = 1
    if i == 1:
        print(Yes)
    else:
        print(No)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    N = int(input())
    if N-90>0:
        print(Yes)
        return
    x = (N-9)/10
    if x == int(x):
        print(Yes)
        return
    print(No)
Problem p03606 (python)

Fixed submission:
if __name__ == '__main__':
    N = int(input())
    ans = 0
    for i in range(N):
        l = list(map(int, input().split()))
        ans += abs(l[1]-l[0]+1)
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    N = int(input())
    ans = 0
    for i in range(N):
        l = list(map(int, input().split()))
        ans += abs(l[1]-l[0])
    print(ans
Problem p03609 (python)

Fixed submission:
if __name__ == '__main__':
    X, t = map(int, input().split())
    re = X-t
    if re>0:
        print(re)
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    X, t = map(int, raw_input().split())
    rt = X-t
    if re>0:
        print(re)
    else:
        print(0)
Problem p03623 (python)

Fixed submission:
if __name__ == '__main__':
    x, a, b = map(int, input().split())
    if abs(x-a) < abs(x-b):
        print('A')
    else:
        print('B')

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    x, a, b = int(input())
    if abs(x-a) < abs(x-b):
        print('A')
    else:
        print('B')
Problem p03624 (python)

Fixed submission:
if __name__ == '__main__':
    S = input()
    dic = [chr(i) for i in range(97, 123)]
    j=0
    for i in range(len(dic)):
        if dic[i] not in S:
            j = 1
            print(dic[i])
            break
    if j == 0:
        print('None')

Buggy submission (verdict: Runtime Error):
if __name__ = '__main__':
    S = input()
    dic = [chr(i) for i in range(97, 123)]
    for i in range(len(dic)):
        if dic[i] not in S:
            print(dic[i])
            return
Problem p03632 (python)

Fixed submission:
if __name__ == '__main__':
    A, B, C, D = map(int, input().split())

    if B <= C or D <= A:
        print(0)
    else:
        if A < C:
            if B < D:
                print(B-C)
            else:
                print(D-C)
        elif A > C:
            if B < D:
                print(B-A)
            else:
                print(D-A)
        else:
            if B < D:
                print(B-A)
            else:
                print(D-A)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    A, B, C, D = map(int, input().split())

    if B <= C or D <= A:
        print(0)
    else:
        if A < C:
            print(B-C)
        elif A > C
            print(D - A)
        else:
            if B < D:
                print(B-A)
            else:
                print(D-A)

Buggy submission (verdict: Runtime Error):
if __name == '__main__':
    A, B, C, D = map(int, input().split())

    if B =< C or D =< A:
        print(0)
    else:
        if A < C:
            print(B-C)
        else:
            print(D - A)
Problem p03473 (python)

Fixed submission:
#coding:utf-8

now = int(raw_input())

time = 48 - now

print time

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

A, B = map(int,raw_input().split())
S = raw_input()

if S[A] != '-':
    print "No"

elif (A != 0) and (S[0:A] in "-"):
    print "No"

elif (B != 0) and (S[A+1:len(S)] in "-"):
    print "No"

else:
    print "Yes"
Problem p03474 (python)

Fixed submission:
#coding:utf-8

A, B = map(int,raw_input().split())
S = raw_input()

if S[A] != '-':
    print "No"

else:
    Flag = 0
    for i in range(A):
        if (S[i] >= '0' and S[i] <= '9') == False:
            Flag = 1
            #print "hello1"
    for i in range(A+1,len(S)):
        if (S[i] >= '0' and S[i] <= '9') == False:
            Flag = 1

    if Flag == 1:
        print "No"
    else:
        print "Yes"

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

A, B = map(int,raw_input().split())
S = raw_input()

if S[A] != '-':
    print "No"

else:
    Flag = 0
    for i in range(A):
        if S[i] >= '0' and S[i] <= '9':
            Flag = 1
    for i in range(A+1,len(S)):
        if S[i] >= '0' and S[i] <= '9':
            Flag = 1

if Flag == 1:
    print "No"
else:
    print "Yes"
Problem p03359 (python)

Fixed submission:
a,b=map(int,input().split())
if a>12 or b>31 :
    print("none")
else:
    if a>b:
        print(a-1)
    else:
        print(a)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
mass=[]
frame=[["."]*(w+2) for i in range(h+2)]
for i in range(h):
    mass.append(list(input()))
for i in range(h):
    for j in range(w):
        frame[i+1][j+1]=mass[i][j]
for i in range(1,h):
        for j in range(1,w):
            if frame[i][j]=="#" and frame[i][j]!=frame[i][j+1] and frame[i][j]!=frame[i+1][j] and frame[i][j]!=frame[i][j-1] and frame[i][j]!=frame[i-1][j]:
                    print("No")
                    exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
k=int(input())
if 0<k<11 and 0<a<=50 and 0<b<=50 and 0<c<=50: 
    l=[a,b,c]
    l.reverse()
    l[0]=l[0]*(2**k)
else:
    print("No")
print(sum(l))
Problem p03361 (python)

Fixed submission:
h,w=map(int,input().split())
mass=[]
f=0
frame=[["."]*(w+2) for i in range(h+2)]
for i in range(h):
    mass.append(list(input()))
for i in range(h):
    for j in range(w):
        frame[i+1][j+1]=mass[i][j]
for i in range(1,h):
    if f==0:
        for j in range(1,w):
            if frame[i][j]=="#" and frame[i][j]!=frame[i][j+1] and frame[i][j]!=frame[i+1][j] and frame[i][j]!=frame[i][j-1] and frame[i][j]!=frame[i-1][j]:
                    f=1
                    break
if f==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
mass=[]
f=0
for i in range(0,h):
    mass.append(list(input()))
for i in range(h):
    if f==0:
        for j in range(w):
            if i!=h and j!=w:
                if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1] and mass[i][j]!=mass[i+1][j]:
                    f=1
                    break
            elif i==h:
                if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1]:
                    f=1
                    break
            else:
                if mass[i][j]=="#" and mass[i][j]!=mass[i+1][j]:
                    f=1
                    break
if f==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
mass=[]
f=0
for i in range(0,h):
    mass.append(list(input()))
for i in range(h):
    if f==0:
        for j in range(w-1):
            if i!=h and j!=w:
                if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1] and mass[i][j]!=mass[i+1][j]:
                    f=1
                    break
            elif i==h:
                if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1]:
                    f=1
                    break
            else:
                if mass[i][j]=="#" and mass[i][j]!=mass[i+1][j]:
                    f=1
                    break
if f==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
mass=[]
f=0
for i in range(h):
    mass.append(input().split())
for i in range(h-1):
    if f==0:
        for j in range(w-1):
            if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1] and mass[i][j]!=mass[i+1][j]:
                print(i,j)
                f=1
                break
if f==0:
    print("Yes")
else:
    print("No")
Problem p03369 (python)

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

price = 700
S = input()
for i in S:
    if i == 'o':
        price = price + 100
print(price)

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

bo = True
if a[0]+a[1] < a[2]*2:
    bo = False
if a[3] > a[4]:
    if bo == True and a[2]*2 >= a[0]:
            price = a[2]*a[4]*2 + (a[3]-a[4])*a[0]
    elif bo == True:
        price = a[2]*a[3]*2
    else:
        price = a[0]*a[3]+a[1]*a[4]
else:
    if bo == True and a[2]*2 >= a[1]:
            price = a[2]*a[3]*2 + (a[4]-a[3])*a[1]
    elif bo == True:
        price = a[2]*a[4]*2
    else:
        price = a[0]*a[3]+a[1]*a[4]
print(price)

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

bo = True
if a[0]+a[1] < a[2]*2:
    bo = False
if a[3] > a[4]:
    if bo == True:
        if a[2]*2 >= a[0]:
            price = a[2]*a[4]*2 + (a[3]-a[4])*a[0]
        else:
            price = a[2]*a[3]*2
    else:
        price = a[0]*a[3]+a[1]*a[4]
else:
    if bo == True:
        if a[2]*2 >= a[1]:
            price = a[2]*a[3]*2 + (a[4]-a[3])*a[1]
        else:
            price = a[2]*a[4]*2
    else:
        price = a[0]*a[3]+a[1]*a[4]
print(price)

Buggy submission (verdict: Runtime Error):
import sys

N, X = map(int, input().split())
a=[]
i = N
for line in sys.stdin:
    a.append(int(line))
a.sort()

X = X - sum(a)
while X - a[0] > 0:
    X = X - a[0]
    i = i + 1
print(i)

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

price = 700
S = raw_input()
for i in S:
    if i= 'o':
        price = price + 100
print price
Problem p03369 (python)

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

# 入力
S = input()

y = 700
S = list(S)
for i in S:
    if i == 'o':
        y += 100

# 出力
print(y)

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

# 入力
N, X = map(int, input().split())
m = [int(input()) for i in range(N)]

cnt = 0

# 最初に全種類生産
for i in m:
    X -= i
    cnt += 1

# 最も安く作れるものを量産
m.sort()
cnt += int(X / m[0])

# 出力
print(cnt)
Problem p03860 (python)

Fixed submission:

def contest(x):

    x = x.split()
    print(x[0][0] + x[1][0] + x[2][0])

if __name__ == "__main__":
    
    x = input()
    contest(x)

Buggy submission (verdict: Runtime Error):

def count():
    a, b, x = map(int, input().split())
    count = 0
    for i in range(a, b+1):
        if i % x == 0:
            count += 1

    print(count)


if __name__ == "__main__":
    count()

Buggy submission (verdict: Runtime Error):

def count():
    a, b, x = map(int, input().split())
    count = 0
    for i in range(a, b+1):
        if i % x == 0:
            count += 1

    print(count)


if __name__ == "__main__":
    count()