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

Fixed submission:
N = int(input())

def main():
    ans = 1
    t = 0
    while t < N:
        t += 1
        ans *= t
        ans %= 1000000007
    print(ans)

if __name__ == '__main__':
    main()

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

def main():
    ans = 1
    t = 0
    while t < N:
        t += 1
        ans *= t
        ans %= 1_000_000_007
    print(ans)

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

Fixed submission:

h,w,a,b=list(map(int,input().split()))

ans=""

for i in range(1,h+1):
    if i<=b:
        s="1"*a+"0"*(w-a)
    else:
        s="0"*a+"1"*(w-a)
    ans+=s+"\n"
print(ans)

Buggy submission (verdict: Runtime Error):

h,w,a,b=list(map(int,input().split())

for i in range(1,h+1):
    if i<=b:
        s="1"*a+"0"*(w-a)
    else:
        s="0"*a+"1"*(w-a)
    print(s)
Problem p02981 (python)

Fixed submission:
import sys
a,b,c=map(int,sys.stdin.readline().split())
print(min(a*b,c))

Buggy submission (verdict: Runtime Error):
import sys
l,r=map(int,sys.stdin.readline().split())
r_m=r%2019
l_m=l%2019
min=2019
if r-l>2019-r_m:
    print(0)
else:
    retu=range(l_m,r_m+1)

    for i in range(len(retu)):
        for j in range(i+1,len(retu)):
            s=retu[i]*retu[j]%2019
            if s<min:
                min=s
print(min)
Problem p02982 (python)

Fixed submission:
import sys
import math
N,D=map(int,sys.stdin.readline().split())
x=[]
count=0
for i in range(N):
    x.append(list(map(int,sys.stdin.readline().split())))

for i in range(N):
    for j in range(i+1,N):

        diff=math.sqrt(sum([(a-b)**2 for a,b in zip(x[i],x[j])]))

        if diff-int(diff)==0:
            count+=1
print(count)

Buggy submission (verdict: Runtime Error):
import sys
import math
N,D=map(int,sys.stdin.readline().split())
x=[]
count=0
for i in range(N):
    x.append(map(int,sys.stdin.readline().split()))
for i in range(N):
    for j in range(n-1):
        if j>=i:
            k=j+1
        else:
            k=j
        diff=math.sqrt(sum([(a-b)**2 for a,b in x[i],x[k]]))
        if diff-int(diff)==0:
            count+=1
print(count)
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=int(input())
a=int(input())
if x<a:
  print(0)
else:
  print(10)
Problem p03455 (python)

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

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

b = input()
b = int(b)

c = a * b

if c % == 2:
  print("Even")
else:
  print("Odd")
Problem p03059 (python)

Fixed submission:
a, b, t = map(int, input().split())
n = int((t + 0.5) // a)
print(n * b)

Buggy submission (verdict: Runtime Error):
a, b, t = input().split()
t = t + 0.5
o = 0

while t > 0:
	t = t - a
    o = o + b

print(o)
Problem p02993 (python)

Fixed submission:
inp = input()
if inp[0] == inp[1]:
   print('Bad')
elif inp[1] == inp[2]:
   print('Bad')
elif inp[2] == inp[3]:
   print('Bad')
else:
   print('Good')

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

l, n = [i for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))
Problem p02994 (python)

Fixed submission:
import numpy as np

n, l = [int(i) for i in input().split(" ")]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = np.where(np.absolute(ll) == np.min(np.absolute(ll)))
ll = list(ll)
del ll[mini[0][0]]

print(np.sum(ll))

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

n, l = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = np.where(ll == np.min(np.absolute(ll)))
ll = list(ll)
del ll[mini[0][0]]

print(np.sum(ll))

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

n, l = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(np.min(np.absolute(ll)))
lll = ll.pop(mini)

print(np.sum(lll))

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

l, n = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(np.min(np.absolute(ll)))
lll = ll.pop(mini)

print(sum(lll))

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

l, n = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))

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

l, n = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))

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

l, n = [i for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))

Buggy submission (verdict: Runtime Error):
import numpy as np
from math import abs, min

l, n = [i for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))
Problem p04043 (python)

Fixed submission:
a = input()

if (a.count("5") == 2 and a.count("7") == 1):
  print("YES")
  
else:
  print("NO")

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

a = input()
b = input()
c = input()
ar = [a,b,c]
ar.sort()
result = ''.join(ar)

print(result)
Problem p02911 (python)

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(n[1])
for i in range(n[2]):
  array[int(input())-1]+=1
for i in range(n[0]):
  array[i]-=n[2]
  if(array[i]<=0):
    print("No")
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(n[1])
for i in range(n[2]):
  array[int(input())-1]+=1
for i in range(n[2]):
  for i in range(n[0]):
    array[i]-=n[2]
	if(array[i]<=0):
      print("No")
    else:
      print("Yes")
Problem p02994 (python)

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
abs_array=[]
for i in range(1,n[0]+1):
  array.append(n[1]+i-1)
  abs_array.append(abs(n[1]+i-1))
abs_array.sort()
if abs_array[0] in array :
  print(sum(array)-abs_array[0])
else:
  print(sum(array)+abs_array[0])

Buggy submission (verdict: Runtime Error):
n=[int(i) for i in input().split()]
array=[]
abs_array=[]
for i in range(n[0]):
  array.append(n[1]+i-1)
  abs_array.append(abs(n[1]+i-1))
abs_array=abs_array.sort()
if(abs_array[0] in array == True):
  print(sum(array)-abs_array[0])
else:
  print(sum(array)+abs_array[0])
Problem p02999 (python)

Fixed submission:
n=[int(i) for i in input().split()]
if(n[0]>=n[1]):
  print(10)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n=[int(i) for i in input().split]
if(n[0]>=n[1]):
  print(10)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
if(int(input())<=int(input())):print(10)
else:print(0)

Buggy submission (verdict: Runtime Error):
if(input()<=input()):print(10)
else:print(0)
Problem p03029 (python)

Fixed submission:
#coding:utf-8
d=[int(i) for i in input().split()]
print(int((d[0]*3+d[1])/2))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
d=[int(i) for i in input().split()]
print(int(answer=(d[0]*3+d[1])/2))
Problem p03206 (python)

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

Buggy submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]):
  print(n[1],n[i+s[1]-1])
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Buggy submission (verdict: Runtime Error):
n=int(input())
if(n==25):
  print("Christmas")
elif(n=24):
  print("Christmas Eve")
elif(n=23):
  print("Christmas Eve Eve")
elif(n==22):
  print("Christmas Eve Eve Eve")
Problem p03219 (python)

Fixed submission:
n=[int(i) for i in input().split()]
print(int(n[0]+n[1]/2))

Buggy submission (verdict: Runtime Error):
n=[int i for i in input.split()]
print(n[0]+n[1]/2)

Buggy submission (verdict: Runtime Error):
n=[int(i) for i in input.split()]
print(n[0]+n[1]/2)
Problem p03260 (python)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]*n[1]%2==0):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
#include<iostream>
using namespace std;
int main(void){
  int a,b;
  cin>>a>>b;
  if(a*b%2==0){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
  return 0;
}
Problem p03282 (python)

Fixed submission:
#coding:utf-8
n=input()
count=0
l=int(input())
for i in range(len(n)):
  if(n[i]=='1'):
    count+=1
    if(l==count):
      print(n[i])
      break;
    continue
  else:
    print(n[i])
    break;

Buggy submission (verdict: Runtime Error):
n=int(input())
k=int(input())
j=0
for i in range(100,-1,-1):
  if(int(n%pow(10,i))==0):
  else:
    s.append(int(n%pow(10,i)))
    n-=s[j]
    j+=1
if(s[0]=1):
  print(s[1])
else:
  print(s[0])
Problem p03284 (python)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]%n[1]==0):
  print(0)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]%n[1]=0):
  print(0)
else:
  print(1)
Problem p03378 (python)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
Ad=0
Au=0
A=[int(i) for i in input().split()]
for i in range(n[1]):
  if(A[i]>n[2]):
    Au+=1
  else:
    Ad+=1
if(Au>=Ad):
  print(Ad)
else:
  print(Au)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
Ad=0
Au=0
A=[int(i) for i in input().split()]
for i in range(n[1]):
  if(A[i]>n[3]):
    Au+=1
  else:
    Ad+=1
if(Au>=Ad):
  print(Ad)
else:
  print(Au)
Problem p03385 (python)

Fixed submission:
#coding utf-8
s=input()
s1=[s[0],s[1],s[2]]
s1.sort()
s1=s1[0]+s1[1]+s1[2]
if(s1!='abc'):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]+1<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]+1):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)
Problem p03386 (python)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]+1<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k jn range(n[1]-n[2]+1,n[1]):
    print(k)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for i in range(n[0],n[0]+n[2]):
    print(i)
  for i jn range(n[1]-n[2]+1,n[1]):
    print(i)
Problem p03456 (python)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
d=n[1]
for i in range(2,-1,-1):
  if(d/pow(10,i)>=1):
    count=i
    break
n[0]=n[0]*int(pow(10,count+1))+n[1]
if(pow(n[0],1/2)==int(pow(n[0],1/2))):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
d=n[1]
for i in range(2,-1,-1):
  if(d%int(pow(10,i))>=1):
    count=i
    break
n[0]=n[0]*int(pow(10,count))+n[1]
if(pow(n[0],1/2)==int(pow(n[0],1/2))):
  print("Yes")
else:
  print("No")
Problem p03469 (python)

Fixed submission:
#coding:utf-8
s=input()
s=s.replace('2017','2018')
print(s)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
s=input()
s.replace(2017,2018)
print(s)
Problem p03555 (python)

Fixed submission:
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO")
else:print("NO")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO)
else:print("NO")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]　and n1[1]==n2[1]):
  print("YES")
else:print("NO")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n1=input()
n2=input()
if(n1[0]==n2[2] & n1[2]==n2[0]):
  print("YES")
else:print("NO")
Problem p03563 (python)

Fixed submission:
#coding:utf-8
n=[]
for i in range(2):
  n.append(int(input()))
n1=n[1]*2-n[0]
print(n1)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
n1=n[1]*2-n[0]
print(n1)
Problem p03852 (python)

Fixed submission:
#coding:utf-8
n=['a','i','u','e','o']
c=input()
if(c in n):
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n=[a,i,u,e,o]
c=input()
if(c in n):
  print("vowel")
else:
  print("consonant")
Problem p02886 (python)

Fixed submission:
n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(len(d)):
    for j in range(i + 1, len(d)):
        if i == j:
            continue
        ans += d[i] * d[j]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(len(d)):
  for j in range(len(d)-i):
    if i == j:
      continue
   	ans += d[i] * d[j]
print(ans)
Problem p02900 (python)

Fixed submission:
def prime_factorize(n):
    a = set([1])
    while n % 2 == 0:
        a.add(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.add(f)
            n //= f
        else:
            f += 2
    a.add(n)
    return a
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
  
a, b = list(map(int, input().split()))
x = gcd(a, b)
print(len(prime_factorize(x)))

Buggy submission (verdict: Runtime Error):
def prime_factorize(n):
    a = set([1])
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n not in a:
        a.add(n)
    return a
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
a, b = list(map(int, input().split()))
x = gcd(a, b)
print(len(prime_factorize(x)))

Buggy submission (verdict: Runtime Error):
def cul(a, b):
  return [i for i in range(1,min(a,b)+1) if a%i==0 and b%i==0]
a, b = list(map(int, input().split()))
cf = cul(a, b)
n = len(cf)
i = 1
while True:
  tmp = cf[i]
  for c in cf[i:]:
    if c==tmp:
      continue
    elif c%tmp==0:
      cf.remove(c)
  if cf[-1]==tmp:
    print(len(cf))
    break
  else:
    i += 1
Problem p02971 (python)

Fixed submission:
import numpy as np
n = int(input())
A = np.array([int(input()) for i in range(n)])
idxs = np.argsort(A)
m1 = A[idxs[-1]]
m2 = A[idxs[-2]]
for i in range(n):
  if i != idxs[-1]:
    print(m1)
  else:
    print(m2)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
A = np.array([int(input()) for i in range(n)])
idxs = np.argsort(A)
m1 = A[idxs[-1]]
m2 = A[idxs[-2]]
if m1 == m2:
  for i in range(n):
    print(m1)
else:
  for i in range(n):
    if i != idx[-1]:
      print(m1)
    else:
   	  print(m2)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
A = np.array([int(input()) for i in range(n)])
idxs = np.argsort(A)
m1 = A[idxs[-1]]
m2 = A[idxs[-2]]
if m1 == m2:
  for i in range(n):
    print(m1)
else:
  for i in range(n):
    if i != idx[-1]:
      print(m1)
    else:
   	  print(m2)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
A = np.array([int(input()) for i in range(n)])
for i in range(n):
  m = np.max(A)
  if A[i] == m:
    mask = A != A[i]
    print(np.max(A[mask]))
  else:
    print(m)

Buggy submission (verdict: Runtime Error):
import numpy as np
l = list(map(int, input().split()))
n = l[0]
A = np.array(l[1:])
for i in range(n):
  m = np.max(A)
  if A[i] == m:
    mask = A != A[i]
    print(np.max(A[mask]))
  else:
    print(m)
Problem p02988 (python)

Fixed submission:
N = int(input())
l = [int(i) for i in input().split()]
count = 0
for i in range(len(l) - 2):
    ll = l[i:i + 3]
    ll.sort()
    if ll[1] == l[i+1]:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
count = 0
for i in range(1, l-1):
  ll = l[i-1:i+1]
  ll.sort()
  if ll[1]==l[i]:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
count = 0
for i in range(l):
  ll = l[i-1:i+1]
  ll.sort()
  if ll[1]==l[i]:
    count+=1
print(count)
Problem p02999 (python)

Fixed submission:
X, A = map(int, input().split())
print(int(X >= A)*10)

Buggy submission (verdict: Runtime Error):
X, A = map(int, input().split())
if X >= A:
  return 10
else:
  return 0
Problem p03469 (python)

Fixed submission:
s = input()
print("2018{}".format(s[4::]))

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

for i in range(int(round(y/10000, 0)) + 1):
    for j in range(int(round(y/5000, 0)) + 1):
        for k in range(int(round(y/1000, 0)) + 1):
            if i+j+k > n:
                break
            elif (10000*i) + (5000*j) + (1000*k) == y and i+j+k == n:
                print(i, j, k)
                exit()

print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
n = int(input())
a = set([input() for i in range(n)])
print(len(a))
Problem p02922 (python)

Fixed submission:
import math

a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))

Buggy submission (verdict: Runtime Error):
import math

a,b=map(int,input().split())
print(ceil((b-1)/(a-1)))
Problem p02957 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input(),split())
if a%2!=b%2:
    print("IMPOSSIBLE")
else:
    print(a+b//2)
Problem p02899 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
index=[0]*n

for i in range(n):
    index[a[i]-1] = i+1

print(' '.join(map(str, index)))

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

for i in range(n+1):
    c.append(a.index(i)+1)

print(' '.join(map(str, c)))

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

for i in b:
    c.append(a.index(i)+1)

print(' '.join(map(str, c)))
Problem p02923 (python)

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

out, cnt = 0, 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        cnt += 1
        out = max(out, cnt)
    else:
        cnt = 0

print(out)

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

cnt = [0]*(n-1)
for i in range(0, len(h)-2):
    for j in range(i, len(h)-1):
        if h[j] >= h[j+1]:
            cnt[i] += 1
        else:
            break

print(max(cnt))

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

cnt = [0]*(n-1)
for i in range(0, len(h)-1):
    for j in range(i, len(h)-1):
        if h[j] >= h[j+1]:
            cnt[i] += 1
        else:
            break

print(max(cnt))
Problem p02924 (python)

Fixed submission:
n = int(input())
print(int(n*(n-1)//2))

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

print(n(n-1)//2)
Problem p03047 (python)

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

ans=N-K+1

print(ans)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())

ans=N-K+1;

input(ans)
Problem p03260 (python)

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

if a%2==0:
    evena=1

if b%2==0:
    evenb=1

if evena != 1 and evenb != 1:
    print('Yes')
else:
    print('No')

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

if a%2==0:
    evena=1

if b%2==0:
    evenb=1

if evena != 1 and evenb != 1:
    print('Yes')
else:
    print('No')
Problem p02909 (python)

Fixed submission:
s=input()
 
if s=="Sunny":
  print("Cloudy")
  
if s=="Cloudy":
  print("Rainy")
 
if s=="Rainy":
  print("Sunny")

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

if s="Sunny":
  print("Cloudy")
  
if s="Cloudy":
  print("Rainy")

if s="Rainy":
  print("Sunny")
Problem p02923 (python)

Fixed submission:
n=int(input())
if n==1:
  print(0)
else: 
  L=list(map(int,input().split()))
#a,b=map(int,input().split())
  A=[0 for i in range(n-1)] 
#l = [int(input()) for i in range(N)]
  B=[0 for i in range(n-1)] 
  for i in range(n-1):
    A[i]=L[i]-L[i+1]

  for i in range(n-1):
    if A[i]>=0:
      B[i]=B[i-1]+1
    else:
      B[i]=0

  print(max(B))

Buggy submission (verdict: Runtime Error):
n=int(input())
L=list(map(int,input().split()))
#a,b=map(int,input().split())
A=[0 for i in range(n-1)] 
#l = [int(input()) for i in range(N)]
B=[0 for i in range(n-1)] 
for i in range(n-1):
  A[i]=L[i]-L[i+1]

for i in range(n-1):
  if A[i]>=0:
    B[i]=B[i-1]+1
  else:
    B[i]=0

print(max(B))
Problem p02957 (python)

Fixed submission:

A,B=map(int,input().split())

if (A+B)%2==1:
  print("IMPOSSIBLE")

else:
  print(int((A+B)/2))

Buggy submission (verdict: Runtime Error):

A,B=map(int,input().split())

if (A+B)%2=1:
  print("IMPOSSIBLE")

else:
  print((A+B)/2)
Problem p03000 (python)

Fixed submission:
n,Xmax=map(int,input().split())
L=list(map(int,input().split()))
x=0
count=1
while x+L[0]<=Xmax:
  count+=1
  x+=L.pop(0)
  if len(L)==0:
    break
print(count)

Buggy submission (verdict: Runtime Error):
n,Xmax=map(int,input().split())
L=list(map(int,input().split()))
x=0
count=1
while x+L[0]<=Xmax:
  count+=1
  x+=L.pop(0)
print(count)

Buggy submission (verdict: Runtime Error):
n,Xmax=map(int,input().split())
L=list(map(int,input().split()))
x=0
count=0
while x<Xmax:
  x+=L.pop(0)
  count+=1
print(count)
Problem p03085 (python)

Fixed submission:
s=input()
 
if s=='A':
  print('T')
elif s=='T':
  print('A')
elif s=='G':
  print('C')
else:
  print('G')

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

if s='A':
  print('T')
elif s='T':
  print('A')
elif s='G':
  print('C')
else:
  print('G')