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

Fixed submission:
N=input()
if N=="RRR":
  print(3)
elif N=="SRR" or N=="RRS":
  print(2)
elif N=="SSR" or N=="RSR" or N=="SRS" or N=="RSS":
  print(1)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
x,k,d=map(int,input().split())
a=divmod(abs(x),d)  
if a[0]<k:
  if a[1]==0 and a[0]%2==1:
    print(d)
  elif a[1]==0 and a[0]%2==0:
    print(0)
  elif a[1]!=0 and a[0]%2!=0:
    if x<0:
      print(d-a[1])
    else:
      print(abs(a[1]-d))
  else:
    print(a[1])
else:
  print(abs(x)-d*k)
Problem p02600 (python)

Fixed submission:
X=int(input())
if X>=1800:
  print(1)
elif X>=1600:
  print(2)
elif X>=1400:
  print(3) 
elif X>=1200:
  print(4)
elif X>=1000:
  print(5)
elif X>=800:
  print(6)
elif X>=600:
  print(7)
else:
  print(8)

Buggy submission (verdict: Runtime Error):
X=int(input())
if X>=1800:
  print(1)
elif X>=1600:
  print(2)
elif X>=1400:
  print(3) 
elif X>=1200:
  print(4)
elif X>=1000:
  print(5)
elif X>=800:
  print(6)
elif X>=600:
  print(7)
else:
  print(8)

elif X>=1600:
  print(2)
Problem p02601 (python)

Fixed submission:
a = list(map(int,input().split()))
b=int(input())
for i in range(b):
  if a[0]>=a[1]:
    a[1]=a[1]*2
  else:
    if a[1]>=a[2]:
      a[2]=a[2]*2
if a[0]<a[1]<a[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b=int(input())
for i in b:
  if list[0]>=list[1]:
    list[1]=list[1]*2
  else:
    if list[1]>=list[2]:
      list[2]=list[2]*2
if list[0]<list[1]<list[2]:
  print("Yes")
else:
  print("No")
Problem p02602 (python)

Fixed submission:
N,K=map(int,input().split())
a=list(map(int,input().split()))
for v in range(N-K):
  if a[v]>=a[K+v]:
    print("No")
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
a=list(map(int,input().split()))
for v in range(K-1):
  if a[v]>=a[K+v]:
    print("No")
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
a=list[map(int,input().split())]
for v in range(K):
  if a[1+v]<=a[K+1+v]:
    print("No")
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
import numpy
a = list(map(int,input().split()))
b = list(map(int,input().split()))
for v in range(a[0]-a[1]+1):
  c=list(map(numpy.prod(b[0+v:a[0]+v]))
for m in range(a[0]-a[1]):
  if c[m+1]>c[m]:
    print("Yes")
  else:
    print("No")
Problem p02613 (python)

Fixed submission:
N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
  print('{0} x {1}'.format(v, s.count(v)))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  print('{0} x {1}'.format(value, b.count(value)))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  print('{0}x{1}'.format(value, b.count(value)))

Buggy submission (verdict: Runtime Error):
1 N = int(input())
2 s = [input() for i in range(N)]
3 for v in ['AC', 'WA', 'TLE', 'RE']:
4 print('{0} x {1}'.format(v, s.count(v)))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  print("{0}x{1}".format(value,b.count(value)))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e==b.count(value)
  print("{0}x{1}".format(value,e))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e=b.count(value)
  print("{0}x{1}".format(value,e))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e==b.count(value)
print("{0}x{1}".format(value,e))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e=b.count(value)
print("{0}x{1}".format(value,e))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e=b.count(value)
print("{0}x{1}".format(value.e))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e=b.count(value)
print("{0}x{1}".format(value.e)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
d=[]
for value in c:
  e=b.count(value)
  d.append(value+"x"+e)
print(d)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
d=[]
for value in c:
  e=b.count(value)
  d.append("value x"+e)
print(d)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
d=[]
for value in c:
  e=b.count(value)
  d.append([value,e])
print(d)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
d=[]
for value in c:
  e=b.count(value)
  d.append(["value x" e])
print(d)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
d=[]
for value in c:
  e=b.count(value)
  d.append([value x e\n])
print(d)
Problem p02628 (python)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
print(sum(sorted(p)[:K]))

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
b.sort()
c=0
for i in b[a[1]]:
  c+=b[i]
  return c
print(c)

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
b.sort()
for i in b[a[1]]:
  c=0
  c+=b[i]
  return c
print(c)
Problem p02640 (python)

Fixed submission:
X,Y=map(int,input().split())
a=Y%4
b=a/2
c=int(Y/4)
if a%2!=0 or b+c>X or 4*X<Y or 2*X>Y:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
X,Y=map(int,input().split())
a=Y%4
b=a/2
c=int(Y/4)
if a%2!=0,b+c>X:
  print("No")
else:
  print("Yes")
Problem p02677 (python)

Fixed submission:
import math
A,B,H,M=map(int,input().split())
c=abs(H*30-M*5.5)
k=A*A+B*B-2*A*B*math.cos(c*math.pi/180)
l=math.sqrt(k)
print(l)

Buggy submission (verdict: Runtime Error):
import math
A,B,H,M=map(int,input().split())
c=abs(H*15-M*6)
k=A*A+B*B-2*A*B*math.cos(c*pi/360)
l=math.sqrt(k)
print(l)

Buggy submission (verdict: Runtime Error):
import math
A,B,H,M=map(int,input().split())
c=abs(H*15-M*6)
k=A*A+B*B-2*A*B*math.cos(c)
l=math.sqrt(k)
print(l:df)

Buggy submission (verdict: Runtime Error):
import math
A,B,H,M=map(int,input().split())
c=abs(H*15-M*6)
k=A*A+B*B-2*A*B*math.cos(c)
l=sqrt.(k)
print(l)
Problem p02837 (python)

Fixed submission:

n = int(input())
people = {}

for i in range(n):
    sentenses = int(input())
    if sentenses > 0:
        for j in range(sentenses):
            v = list(map(int, input().split()))
            if i in people.keys():
                people[i].append(v)
            else:
                people[i] = [v]
            
ans = 0

for i in range(2**n):
    speaker = []
    p_list = [0] * n
    for j in range(n):
        if ((i >> j) % 2) == 1:
            speaker.append(j)
            p_list[j] = 1

    continue_flag = True
    for s in speaker:
        if continue_flag:
            if s in people.keys():
                sentenses = people[s]
            else:
                continue
            for sent in sentenses:
                if p_list[sent[0]-1] == sent[1]:
                    p_list[sent[0]-1] = sent[1]
                else:
                    continue_flag = False
                    break
        else:
            break
        
    if continue_flag:
        temp_ans = len(speaker)
        ans = max(temp_ans, ans)

print(ans)

Buggy submission (verdict: Runtime Error):

n = int(input())
people = {}

for i in range(n):
    sentenses = int(input())
    if sentenses > 0:
        for j in range(sentenses):
            v = list(map(int, input().split()))
            if i in people.keys():
                people[i].append(v)
            else:
                people[i] = [v]
            
ans = 0

for i in range(2**n):
    speaker = []
    p_list = [0] * n
    for j in range(n):
        if ((i >> j) % 2) == 1:
            speaker.append(j)
            p_list[j] = 1

    continue_flag = True
    for s in speaker:
        if continue_flag:
            sentenses = people[s]
            for sent in sentenses:
                if p_list[sent[0]-1] == sent[1]:
                    p_list[sent[0]-1] = sent[1]
                else:
                    continue_flag = False
                    break
        else:
            break
        
    if continue_flag:
        temp_ans = len(speaker)
        ans = max(temp_ans, ans)

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
people = {}

for i in range(n):
    sentenses = int(input())
    for j in range(sentenses):
        v = list(map(int, input().split()))
        if i in people.keys():
            people[i].append(v)
        else:
            people[i] = [v]
            
ans = 0

for i in range(2**n):
    speaker = []
    p_list = [0] * n
    for j in range(n):
        if ((i >> j) % 2) == 1:
            speaker.append(j)
            p_list[j] = 1

    continue_flag = True
    for s in speaker:
        if continue_flag:
            sentenses = people[s]
            for sent in sentenses:
                if p_list[sent[0]-1] == sent[1]:
                    p_list[sent[0]-1] = sent[1]
                else:
                    continue_flag = False
                    break
        else:
            break
        
    if continue_flag:
        temp_ans = len(speaker)
        ans = max(temp_ans, ans)

print(ans)
Problem p02885 (python)

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

ans = max(0, a - (2*b))

print(ans)

Buggy submission (verdict: Runtime Error):

n = int(input())
tastes = list(map(lambda x:int(x), input().split()))

ans = 0

while len(tastes)>0:
    x = tastes[0]
    del tastes[0]
    for y in tastes:
        ans += x * y
            
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
tastes = list(map(lambda x:int(x), input().split()))

ans = 0

while len(tastes)>0:
    x = tastes.pop()
    for y in tastes:
        ans += x * y
        
print(ans)
Problem p02886 (python)

Fixed submission:
n = int(input())
tastes = list(map(lambda x:int(x), input().split()))

ans = 0

while len(tastes)>0:
    x = tastes.pop()
    for y in tastes:
        ans += x * y
            
print(ans)

Buggy submission (verdict: Runtime Error):
    n = int(input())
    tastes = list(map(lambda x:int(x), input().split()))
    
    ans = 0
    
    while len(tastes)>0:
        x = tastes.pop()
        for y in tastes:
            ans += x * y
            
    print(ans)
Problem p02888 (python)

Fixed submission:
import bisect

n = int(input())
#length = list(map(lambda x:int(x), input().split()))
length = list(map(int, input().split()))
length.sort()
ans = 0
for i in range(n-2):  
    a = length[i]
    for j in range(i+1,n-1):
        b = length[j]
        if i >= j:
            continue
        else:
            max_bar = bisect.bisect_left(length,a+b)
            ans += max_bar - j - 1
            
print(ans)

Buggy submission (verdict: Runtime Error):
import bisect
    
    n = int(input())
    length = list(map(lambda x:int(x), input().split()))
    length.sort()
    ans = 0
    for i in range(n):
        a = length[i]
        for j in range(n):
            b = length[j]
            if i >= j:
                continue
            else:
                c_candidates = length[j+1:]
                min_bar = bisect.bisect_right(c_candidates,max(a-b, b-a))
                max_bar = bisect.bisect_left(c_candidates,a+b)
                ans += max_bar - min_bar
                
    print(ans)
Problem p02923 (python)

Fixed submission:
n = int(input())
h_list = list(map(lambda x: int(x), input().split()))

max_move = 0
current_move = 0
s = 0
t = 1
continue_flag = True

if n == 1:
    print(0)
else:
    while continue_flag:
        if h_list[s] >= h_list[t]:
            current_move += 1
            s += 1
            t += 1
        else:
            max_move = max([max_move, current_move])
            current_move = 0
            s += 1
            t += 1

        if t == n:
            max_move = max([max_move, current_move])
            continue_flag = False

    print(max_move)

Buggy submission (verdict: Runtime Error):
n = int(input())
h_list = list(map(lambda x: int(x), input().split()))

max_move = 0
current_move = 0
s = 0
t = 1
continue_flag = True


while continue_flag:
    if h_list[s] >= h_list[t]:
        current_move += 1
        s += 1
        t += 1
    else:
        max_move = max([max_move, current_move])
        current_move = 0
        s += 1
        t += 1
        
    if t == n:
        max_move = max([max_move, current_move])
        continue_flag = False
        
print(max_move)

Buggy submission (verdict: Runtime Error):
n = int(input())
h_list = list(map(lambda x: int(x), input().split()))

max_move = 0
current_move = 0
s = 0
t = 1
continue_flag = True


while continue_flag:
    if h_list[s] >= h_list[t]:
        current_move += 1
        s += 1
        t += 1
    else:
        max_move = max([max_move, current_move])
        s += 1
        t += 1
        
    if t == n-1 or s == n-2:
        max_move = max([max_move, current_move])
        continue_flag = False
        
print(max_move)
Problem p02960 (python)

Fixed submission:
s = list(input())

digits = len(s)
s.reverse()
dp = [ [0] * 13 for i in range(digits)]
# dp[i][j] は i+1桁目までで13で割った余りがjのものを格納する
mod = 10 ** 9 + 7
power = 1

for i in range(digits):
    if s[i] == '?':
        for j in range(10):
            if i == 0:
                dp[i][j] += 1
            else:
                amari = (j * power) % 13
                for k in range(13):
                    dp[i][(k+amari)%13] = (dp[i][(k+amari)%13] + dp[i-1][k]) % mod
    else:
        val = int(s[i])
        if i == 0:
            dp[i][val] += 1
        else:
            amari = (val * power)% 13
            for k in range(13):
                dp[i][(k+amari)%13] = (dp[i][(k+amari)%13] + dp[i-1][k]) % mod
    power = (power * 10) % 13
print(dp[digits-1][5])

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

digits = len(s)
s.reverse()
dp = [ [0] * 13 for i in range(digits)]
# dp[i][j] は i+1桁目までで13で割った余りがjのものを格納する

for i in range(digits):
    if s[i] == '?':
        for j in range(10):
            if i == 0:
                dp[i][j] += 1
            else:
                amari = ( j * 10 ** (i) ) % 13
                for k in range(13):
                    dp[i][(k+amari)%13] += dp[i-1][k]
    else:
        val = int(s[i])
        if i == 0:
            dp[i][val] += 1
        else:
            amari = ( val * 10 ** (i) ) % 13
            for k in range(13):
                dp[i][(k+amari)%13] += dp[i-1][k]
    
print(dp[digits-1][5]/(10**9 + 7))

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

digits = len(s)
s.reverse()
dp = [ [0] * 13 for i in range(digits)]
# dp[i][j] は i+1桁目までで13で割った余りがjのものを格納する

for i in range(digits):
    if s[i] == '?':
        for j in range(10):
            if i == 0:
                dp[i][j] += 1
            else:
                amari = ( j * 10 ** (i) ) % 13
                for k in range(13):
                    dp[i][(k+amari)%13] += dp[i-1][k]
    else:
        val = int(s[i])
        if i == 0:
            dp[i][val] += 1
        else:
            amari = ( val * 10 ** (i) ) % 13
            for k in range(13):
                dp[i][(k+amari)%13] += dp[i-1][k]
    
print(dp[digits-1][5]/(10**9 + 7))
Problem p02995 (python)

Fixed submission:
# x 以下でc, d 両方で割れない条件を満たす自然数の個数をf(x, c, d) とすると
# 求める値は f(b, c, d) - f(a-1, c, d)
# x 以下でk で割れる自然数の個数を g(x, k)とすれば
# f(x, c, d) = x - (g(x, c) + g(x, d) - g(x, lcm(c,d)))
# よって計算すべきは
# g(b, c) + g(b, d) - g(b, lcm(c,d)) - ( g(a-1, c) + g(a-1, d) - g(a-1, lcm(c,d)))
 
def gcd (p, q):
    temp = max(p, q)
    q = min(p, q)
    p = temp
    if q == 0:
        return p
    else:
        return gcd(q, p%q)
    
def lcm(p, q):
    return p * q // gcd(p, q)
 
def g(x, k):
    return x//k
 
def f(x, c, d):
    return x - (g(x, c) + g(x, d) - g(x, lcm(c,d)))
 
a,b,c,d = list(map(lambda x:int(x) ,input().split()))
 
print(f(b, c, d) - f(a-1, c, d))

Buggy submission (verdict: Runtime Error):
import math

# x 以下でc, d 両方で割れない条件を満たす自然数の個数をf(x, c, d) とすると
# 求める値は f(b, c, d) - f(a-1, c, d)
# x 以下でk で割れる自然数の個数を g(x, k)とすれば
# f(x, c, d) = x - (g(x, c) + g(x, d) - g(x, lcm(c,d)))
# よって計算すべきは
# g(b, c) + g(b, d) - g(b, lcm(c,d)) - ( g(a-1, c) + g(a-1, d) - g(a-1, lcm(c,d)))

def lcm(p, q):
    return p * q // math.gcd(p, q)

def g(x, k):
    return x//k

def f(x, c, d):
    return x - (g(x, c) + g(x, d) - g(x, lcm(c,d)))

a,b,c,d = list(map(lambda x:int(x) ,input().split()))

print(f(b, c, d) - f(a-1, c, d))
Problem p03472 (python)

Fixed submission:
n, h = list(map(int, input().split()))
cut = 0
throw = []

for i in range(n):
    a, b = list(map(int, input().split()))
    cut = max(cut, a)
    throw.append(b)

throw.sort(reverse=True)
throw_cam = []
for i in range(n):
    if cut > throw[i]:
        break
    if i == 0:
        throw_cam.append(throw[0])
    else:
        throw_cam.append(throw[i] + throw_cam[i-1])

if throw_cam[len(throw_cam)-1] < h:
    rh = h - throw_cam[len(throw_cam)-1]
    if rh % cut == 0:
        print(len(throw_cam) + rh//cut)
    else:
        print(len(throw_cam) + rh//cut + 1)
else:
    for i in range(len(throw_cam)):
        d = throw_cam[i]
        if d >= h:
            print(i+1)
            break

Buggy submission (verdict: Runtime Error):
n, h = list(map(int, input().split()))
cut = 0
throw = []

for i in range(n):
    a, b = list(map(int, input().split()))
    cut = max(cut, a)
    throw.append(b)

throw.sort(reverse=True)
throw_cam = []
for i in range(n):
    if cut >= throw[i]:
        break
    if i == 0:
        throw_cam.append(throw[0])
    else:
        throw_cam.append(throw[i] + throw_cam[i-1])

if throw_cam[len(throw_cam)-1] < h:
    rh = h - throw_cam[len(throw_cam)-1]
    if rh % cut == 0:
        print(len(throw_cam) + rh//cut)
    else:
        print(len(throw_cam) + rh//cut + 1)
else:
    for i in range(len(throw_cam)):
        d = throw_cam[i]
        if d >= h:
            print(i+1)
Problem p03848 (python)

Fixed submission:
n = int(input())

a_list = list(map(int, input().split()))
a_list.sort()
a_counter = {}
MOD = 10**9 + 7
for a in a_list:
    if a in a_counter.keys():
        a_counter[a] += 1
    else:
        a_counter[a] = 1

data_error = False

if n % 2 == 0:
    for i in range(1, n, 2):
        if i not in a_counter.keys():
            data_error = True
            break
        if a_counter[i] != 2:
            data_error = True
            break
else:
    for i in range(0, n, 2):
        if i not in a_counter.keys():
            data_error = True
        if a_counter[i] != 2:
            if i == 0 and a_counter[0] == 1:
                continue
            data_error = True
            break

if data_error:
    print(0)
else:
    ans = 2 ** (int(n / 2))
    ans %= MOD
    print(ans)

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

a_list = list(map(int, input().split()))
a_list.sort()
a_counter = {}
for a in a_list:
    if a in a_counter.keys():
        a_counter[a] += 1
    else:
        a_counter[a] = 1

data_error = False

if n % 2 == 0:
   for i in range(1, n, 2):
       if a_counter[i] != 2:
           data_error = True
else:
    for i in range(0, n, 2):
        if a_counter[i] != 2:
            if i == 0 and a_counter[0] == 1:
                continue
            data_error = True

if data_error:
    print(0)
else:
    print(2**(int(n/2)))
Problem p02724 (python)

Fixed submission:
yen=int(input())
big=yen//500
small=(yen-500*big)//5
print(1000*big+5*small)

Buggy submission (verdict: Runtime Error):
yen=int(input())
big=yen//500
small=(yen-500*big)//5
print(1000*big+5*small
Problem p02772 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
result='APPROVED'
for i in a:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            result='DENIED'
print(result)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=map(int,input().split())
for i in a:
    if i%2==0:
        if i%3!=0 or i%5!=0:
            result='DENIDE'
        else:
            result='APROVED'
print(result)
Problem p02830 (python)

Fixed submission:
n=int(input())
s,t=map(str,input().split())
result=''
for i in range(0,n):
    result+=s[i]
    result+=t[i]
print(result)

Buggy submission (verdict: Runtime Error):
n=int(input())
s,t=map(input().split())
result=''
for i in range(0,n):
    result+=s[i]
    reuslt+=t[i]
print(result)
Problem p02999 (python)

Fixed submission:
x,a=map(int,input().split())
if x<a:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
x,a=map(int,input().split())
if x<a:
    print(0)
elif:
    print(10)
Problem p03086 (python)

Fixed submission:
s=input()
count=0
a=0
for i in s:
    if i=='A' or i=='C' or i=='G' or i=='T':
        count+=1
        if a<count:
            a=count
    else:
        count=0
print(a)

Buggy submission (verdict: Runtime Error):
import re
s=input()
count=0
result=re.search(r'[ACGT]+',s)
i=result.group()
for _ in i:
    count+=1
print(count)
Problem p03238 (python)

Fixed submission:
o=int(input())
if o==1:
    print('Hello World')
else:
    a=int(input())
    b=int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
o=int(input())
a=int(input())
b=int(input())
if o==1:
    print('Hello World')
else:
    print(a+b)
Problem p03378 (python)

Fixed submission:
n,m,x=map(int,input().split())
la=list(map(int,input().split()))
count1=0
count2=0
y=x
while y>=0:
    for i in la:
        if y==i:
            count1+=1
    y-=1

while x<=n:
    for i in la:
        if x==i:
            count2+=1
    x+=1
if count2>count1:
    print(count1)
else:
    print(count2)

Buggy submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
la=list(map(int,input().split()))
n,m,x=map(int,input().split())
la=list(map(int,input().split()))
count1=0
count2=0
while x>=0:
    for i in la:
        if x==i:
            count1+=1
    x-=1
while x<=n:
    for i in la:
        if x==i:
            count2+=1
    x+=1
if count2>count1:
    print(count1)
else:
    print(count2)
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,b=map(int,input().split())
if (a*b)%2==0:
  print('Even')
else print('Odd')
Problem p04043 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a==5 or 7 and b==5 or 7 and c==5 or 7:
    if a+b+c==17:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if set(a,b,c)=={5,5,7}:
    print('YES')
else:
    print('NO')
Problem p02640 (python)

Fixed submission:
x,y=map(int,input('').split(' '))
q=0
for a in range(x+1):
    s=0
    s+=a*2
    s+=(x-a)*4
    if s==y:
        q=1
        break

if q==0:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
q=0
for a in range(x+1):
    s=0
    s+=a*2
    s+=(x-a)*4
    if s==y:
        q=1
        break

if q==0:
    print('No')
else:
    print('Yes')