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

Fixed submission:
n=int(input())
s=['M','A','R','C','H']
for i in range(n):
    i=input()
    s.append(i[0])

import collections
c = collections.Counter(s)
d=['M','A','R','C','H']
ans=0
for i in range(3):
    for j in range(i+1,4):
        for k in range(j+1,5):
            ans+=(c[d[i]]-1)*(c[d[j]]-1)*(c[d[k]]-1)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=['M','A','R','C','H']
for i in range(n):
    i=input()
    s.append(i[0])

import collections
c = collections.Counter(s)
d=['M','A','R','C','H']
ans=0
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            ans+=(c[d[i]]-1)*(c[d[j]]-1)*(c[d[k]]-1)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
for i in range(n):
    i=input()
    s.append(i[0])

import collections
c = collections.Counter(s)
d=['M','A','R','C','H']
ans=0
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            ans+=c[d[i]]*c[d[j]]*c[d[k]]
print(ans)
Problem p03476 (python)

Fixed submission:
q=int(input())
import math
import numpy as np
def is_prime(n):
    if n==1:return False
    for k in range(2,int(math.sqrt(n))+1):
        if n%k==0:
            return False
    return True
def is_is_prime(n):
    an=0
    if is_prime((n+1)//2)==True:
        if is_prime(n)==True:
            an=1
    return an
ko=[]
for i in range(1,10**5,2):
    ko.append(is_is_prime(i))

koko=np.cumsum(ko)

for i in range(q):
    l,r=map(int,input().split()) 
    if l==1:
        ans=koko[(r-1)//2]-koko[(l-1)//2]
    else:
        ans=koko[((r-1)//2)]-koko[((l-1)//2)-1]
    print(ans)

Buggy submission (verdict: Runtime Error):
q=int(input())
import math
import numpy as np
def is_prime(n):
    if n==1:return False
    for k in range(2,int(math.sqrt(n))+1):
        if n%k==0:
            return False
    return True
def is_is_prime(n):
    an=0
    if is_prime((n+1)//2)==True:
        if is_prime(n)==True:
            an=1
    return an
ko=[]
for i in range(1,10**5,2):
    ko.append(is_is_prime(i))

koko=np.cumsum(ko)

for i in range(q):
    l,r=map(int,input().split()) 
    if l==r:       
        if is_is_prime(l)==True:
            print(1)
        else:
            print(0)
    else:
        print(koko[r]-koko[l])

Buggy submission (verdict: Runtime Error):
q=int(input())
import math
import numpy as np
def is_prime(n):
    if n==1:return False
    for k in range(2,int(math.sqrt(n))+1):
        if n%k==0:
            return False
    return True
def is_is_prime(n):
    an=0
    if is_prime((n+1)//2)==True:
        if is_prime(n)==True:
            an=1
    return an
ko=[]
print(is_is_prime(3))
for i in range(1,10**2,2):
    ko.append(is_is_prime(i))

koko=np.cumsum(ko)

for i in range(q):
    l,r=map(int,input().split()) 
    print(koko[r]-koko[l])
Problem p03607 (python)

Fixed submission:
import collections
c=collections.Counter()
N=int(input())
for i in range(N):
    c[int(input())]+=1
d=list(filter(lambda x:c[x]%2==1,c))
print(len(d))

Buggy submission (verdict: Runtime Error):
mport collections
c=Counter()
N=input()
for i in range(N):
    c[input()]+=1
d=list(filter(lambda x:c[x]%2==1,c))
print(len(d))

Buggy submission (verdict: Runtime Error):
import collections
c=Counter()
N=int(input())
for i in range(N):
    c[int(input())]+=1
d=list(filter(lambda x:c[x]%2==1,c))
print(len(d))
Problem p03695 (python)

Fixed submission:
N=int(input())
A=[int(x)for x in input().split()]
array=[0]*9
def wake(x):
    if x<3200:
        array[x//400]+=1
    else:
        array[8]+=1
    return
for i in A:
    wake(i)
ans1=sum(1 for x in array[:-1]if x>0)
ans=8-array.count(0)
if array[8]==0:
    ans+=1
else:
    ans+=array[8]

if ans1==0:
    ans1+=1

print(ans1,ans)

Buggy submission (verdict: Runtime Error):
ans1=sum(1 for x in array[:-1]if x>0)
ans=8-array.count(0)
if array[8]==0:
    ans+=1
else:
    ans+=array[8]
    if ans>8:
        ans=8
if ans1==0:
    ans1+=1

print(ans1,ans)
Problem p03773 (python)

Fixed submission:
A,B=map(int,input().split())
print((A+B)%24)

Buggy submission (verdict: Runtime Error):
N=int(input())
n=len(str(N))
m=(n//2)
def wari(x):
    array=[]
    if m==0:
        for j in range(9,0,-1):
            if N%j==0:
                c=max(len(str(N//j)),len(str(j)))
                array.append(c)
                break
        
    for i in range(m+1):
        if i==0:
            for j in range(9,0,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
        else:
            for j in range((10**(i+1))-1,(10**i)-1,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
    return min(array)
print(wari(N))
Problem p03826 (python)

Fixed submission:
A,B,C,D=map(int,input().split())
print(max(A*B,C*D))

Buggy submission (verdict: Runtime Error):
n=int(input())
array=[]
for i in range(2,n+1):
    s=i
    while s!=1:
        turn=0
        for j in range(2,s+1):
            if s%j==0:
                s=s//j
                array.append(j)
                break
ans=1
import collections
c=collections.Counter(array)
l=list(c.values())
print(l)
for i in range(len(l)):
    ans*=l[i]+1
print(ans%(10**9+7))
Problem p03844 (python)

Fixed submission:
A,op,B=input().split()
if op=='-':
    print(int(A)-int(B))
else:
    print(int(A)+int(B))

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(x)for x in input().split()]
B=[]
if N%2==0:
    B= sorted([2*i-1 for i in range(1,N//2+1)]*2)
    if sorted(A)==B:
        ans=(pow(2,N/2))%(10**9+7)
    else:
        ans=0
else:
    B= [0]+sorted([2*i for i in range(1,N//2+1)]*2)
    if sorted(A)==B:
        ans=(pow(2,(N-1)/2))%(10**9+7)
    else:
        ans=0
print(int(ans))
Problem p03998 (python)

Fixed submission:
sa = input()
sb = input()
sc = input()
turn = sa[0]
sa = sa[1:]
while True:
    if turn == 'a':
        if not sa:
            win = 'A'
            break
        else:
            turn = sa[0]
            sa = sa[1:]
    if turn == 'b':
        if not sb:
            win = 'B'
            break
        else:
            turn = sb[0]
            sb = sb[1:]
    if turn == 'c':
        if not sc:
            win = 'C'
            break
        else:
            turn = sc[0]
            sc = sc[1:]
print(win)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
C=input()
D=[]
E=[]
F=[]
s=a
x=len(A)
y=len(B)
z=len(C)
for i in range(len(A)):
    D.append(A[i])
for i in range(len(B)):
    E.append(B[i]) 
for i in range(len(C)):
    F.append(C[i])
while x>=0 and y>=0 and z>=0:
    if s==a:
        if x==0:
            print("A")
            break
        else:
            count=D[0]
            D.pop(0)
            x-=1
    elif s==b:
        if y==0:
            print("B")
            break
        else:
            count=E[0]
            E.pop(0)
            y-=1
    elif s==c:
        if z==0:
            print("C")
            break
        else:
            count=F[0]
            F.pop(0)
            z-=1

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
C=input()
D=[]
E=[]
F=[]
s=a
x=len(A)
y=len(B)
z=len(C)
for i in range(len(A)):
    D.append(A[i])
for i in range(len(B)):
    E.append(B[i]) 
for i in range(len(C)):
    F.append(C[i])
while x>=0 and y>=0 and z>=0:
    if s==a:
        if x==0:
            print("A")
            break
        else:
            count=D[0]
            D.pop(0)
            x-=1
    elif s==b:
        if y==0:
            print("B")
            break
        else:
            count=E[0]
            E.pop(0)
            y-=1
    else:
        if z==0:
            print("C")
            break
        else:
            count=F[0]
            F.pop(0)
            z-=1
Problem p02621 (python)

Fixed submission:
a = int(input())

print(a+a**2+a**3)

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

print(a+a**2+a**3)
Problem p02628 (python)

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

price = list(map(int,input().split()))

price.sort()

ans = sum(price[:K])
print(ans)

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

price = list(map(int,input(),split()))

price.sort()

for p in range(1,K):
	ans  += price[p]

print(ans)

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

price = list(map(int,input(),split()))

price.sort

for p in range(1,K):
	ans  += price[p]

print(ans)
Problem p02923 (python)

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

res = []
count = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    count += 1
    if i == (n-2):
      res.append(count)
  else:
    if count != 0: 
      res.append(count)
    count = 0

if len(res) == 0:
  print(0)
else:
  print(max(res))

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

res = []
count = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    count += 1
    if i == (n-2):
      res.append(count)
  else:
    res.append(count)
    count = 0

      
print(max(res))

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

res = []
count = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    count += 1
  else:
    if h[n-2] >= h[n-1]:
      count += 1
    res.append(count)
    count = 0
      
print(max(res))
Problem p03486 (python)

Fixed submission:
s = list(input())
s.sort()
s = "".join(s)

t = list(input())
t.sort(reverse=True)
t = "".join(t)

if s < t:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s,t = list(input()),list(input())
s.sort()
t.sort(reverse=True)
count = 0
while count < len(s):
  if t[count] > s[count]:
    print("Yes")
    exit()
  else:
    count += 1
print("No")

Buggy submission (verdict: Runtime Error):
s,t = list(input()),list(input())
s.sort()
t.sort(reverse=True)
count = 0
while count < len(s):
  if t[count] > s[0]:
    print("Yes")
    exit()
  else:
    count += 1
print("No")
Problem p03644 (python)

Fixed submission:
n = int(input())

count1 = 0

for i in range(1,n+1):
  a = i%2
  b = i/2
  count = 1
  while a ==0:
    a = b%2
    b = b/2
    count += 1
  if count > count1:
    count1 = count
    max_num = i
print(max_num)

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

count1 = 0

for i in range(1,n):
  a = i%2
  b = i/2
  count = 1
  while a ==0:
    a = b%2
    b = b/2
    count += 1
  if count > count1:
    count1 = count
    max_num = i
print(max_num)
Problem p02731 (python)

Fixed submission:
L = int(input())
clue = L/3
ans = (L/3)**3
print(ans)

Buggy submission (verdict: Runtime Error):
L = int(input())
if L%3 == 0:
  a == L/3
  print(a**3)
elif L%3 == 1:
  b = L/3 + 2/3
  c = (L - b)/2
  print(b*c**2)
else:
  pass
Problem p02741 (python)

Fixed submission:
K = int(input())
k = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(k[K-1])

Buggy submission (verdict: Runtime Error):
def main():
  list_s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
  list_s.sort()
  
  k = int(input())
  
  print(list_s[k+1])
  
main()

Buggy submission (verdict: Runtime Error):
def main():
  list_s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
  k = int(input())
  
  print(list_s[k+1])
  
main()
Problem p02606 (python)

Fixed submission:
import math
import itertools as p
l,r,d = map(int,input().split())
count = 0
for i in range(l,r+1):
	if i%d == 0:
		count+=1
print(count)

Buggy submission (verdict: Runtime Error):
import math
import itertools as p
l = int(input())
r = int(input())
d = int(input())
count = 0
for i in range(l,r+1):
	if i%d == 0:
		count+=1
print(count)
Problem p02607 (python)

Fixed submission:
x = int(input())
c = [i for i in range(1,x+1)]
l = map(int,input().split())
count = 0
for i,j in zip(c,l):
	if i% 2== 1 and j%2 == 1:
		count+=1
print(count)

Buggy submission (verdict: Runtime Error):
x = int(input())
c = [i for i in range(1,x+1)]
l = map(int,input().split())
count = 0
for i,j in zip(c,l):
	if i% 2== 1 and j%2 == 1:
		count+=1a
print(count)
Problem p02645 (python)

Fixed submission:
s = input()
print(s[:3].lower())

Buggy submission (verdict: Runtime Error):
s = int(input())
print(s[:3].lower())
Problem p02882 (python)

Fixed submission:
import math
a,b,c=map(int,input().split())
if b-c/a/a==0:
 print(0)
elif a*a*b/2<c:
 print(90-math.degrees(math.atan(a/(b*2-c/a/a*2))))
else:
 print(math.degrees(math.atan(b/(2*c/a/b))))

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input().split())
if a*a*b/2<c:
 print(90-math.degrees(math.atan(a/(b*2-c/a/a*2))))
else:
 print(math.degrees(math.atan(b/(2*c/a/b))))
Problem p03161 (python)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
final=[0]*n
if k>=n:
  print(abs(l[n-1]-l[0]))
else:   
   for i in range(1,k+1):
      final[i]=abs(l[i]-l[0])
  
   for i in range(k+1,n):

      li=[abs(l[i]-l[ik])+final[ik] for ik in range(i-1,i-k-1,-1) ]
      final[i]=min(li)
   print(final[-1])

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
final=[0]*n
if k>=n:
  print(abs(l[n-1]-l[0]))
else:   
   for i in range(1,k+1):
      final[i]=abs(l[i]-l[0])
  
   for i in range(k+1,n):

      li=[abs(h[i]-h[ik])+dp[ik] for ik in range(i-1,i-k-1,-1) ]
      final[i]=min(li)
   print(final[-1])

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
final=[0]*n
if k>=n:
  print(abs(l[n-1]-l[0]))
else:   
   for i in range(1,k+1):
      final[i]=abs(l[i]-l[0])
  
   for i in range(k+1,n):

      mini=10**9+1



  
      x=k
      for j in range(1,x+1):

           mini=min(mini,final[i-j]+abs(l[i]-l[i-j]))
      final[i]=mini
    print(final[-1])
Problem p02621 (python)

Fixed submission:
a = input()
a = int(a)
print(a + a*a + a*a*a)

Buggy submission (verdict: Runtime Error):
a = input()
print(a + a*a + a*a*a)
Problem p02675 (python)

Fixed submission:
n=int(input())
a=n%10
if a==3:
  print('bon')
elif a==0:
  print('pon')
elif a==1:
  print('pon')
elif a==6:
  print('pon')
elif a==8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
k=int(input())
s=input()
l=len(s)
if l<=k:
  print(s)
else:
  p=s[1:k]
  q='...'
  r=p+q
  print(r)
Problem p02747 (python)

Fixed submission:
S=input()
n=len(S)
if n==2:
  if S=='hi':
    print('Yes')
  else:
    print('No')
elif n==4:
  if S=='hihi':
    print('Yes')
  else:
    print('No')
elif n==6:
  if S=='hihihi':
    print('Yes')
  else:
    print('No')
elif n==8:
  if S=='hihihihi':
    print('Yes')
  else:
    print('No')
elif n==10:
  if S=='hihihihihi':
    print('Yes')
  else:
    print('No')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
if n==2:
  if S=='hi':
    print('Yes')
  else:
    print('No')
elif n==4:
   if S=='hihi':
    print('Yes')
  else:
    print('No')
elif n==6:
  if S=='hihihi':
    print('Yes')
  else:
    print('No')
elif n==8:
   if S=='hihihihi':
    print('Yes')
  else:
    print('No')
elif n==10:
   if S=='hihihihihi':
    print('Yes')
  else:
    print('No')
else:
  print('No')
Problem p02811 (python)

Fixed submission:
K,X=input().split()
k=int(K)
x=int(X)
if 500*k>=x:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
K,X=input().split()
k=int(K)
x=int(X)
if 500*k>==x:
  print('Yes')
else:
  print('No')
Problem p02999 (python)

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

Buggy submission (verdict: Runtime Error):
N,X=input().split()
n=int(N)
x=int(X)
i=list(map(int,input().split()))
D=0
k=0
while D<=x:
  if k<=n+1:
    D=D+i[k]
    k=k+1
  else:
    k=n+1
print(k)

Buggy submission (verdict: Runtime Error):
N,X=input().split()
n=int(N)
x=int(X)
i=list(map(int,input().split()))
D=0
k=0
while D<=x:
  while k<=n+1:
    D=D+i[k]
    k=k+1
print(k)
Problem p03206 (python)

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

Buggy submission (verdict: Runtime Error):
d=int(input())
if d=25:
  print('Christmas')
elif:
  print('Christmas Eve')
elif:
  print('Christmas Eve Eve')
else:
  print('Christmas Eve Eve Eve')
Problem p03280 (python)

Fixed submission:
a,b=input().split()
A=int(a)
B=int(b)
print((A-1)*(B-1))

Buggy submission (verdict: Runtime Error):
a,b=input().split.
A=int(a)
B=int(b)
print((A-1)*(B-1))
Problem p03385 (python)

Fixed submission:
s=input()
x=s.count('a')
y=s.count('b')
z=s.count('c')
if x==1 and y==1 and z==1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s=input()
x=s.count('a')
y=s.count('b')
z=s.count('c')
if a==1 and a==1 and a==1:
  print('Yes')
else:
  print('No')
Problem p03697 (python)

Fixed submission:
A,B=input().split()
a=int(A)
b=int(B)
x=a+b
if x>=10:
  print('error')
else:
  print(x)

Buggy submission (verdict: Runtime Error):
A,B=input().spliy()
a=int(A)
b=int(B)
x=a+b
if x>10:
  print('error')
else:
  print(x)
Problem p02923 (python)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
nm = len(h)
ans = 0
for _ in range(nm):
    cnt = 0
    while True:
        if len(h) == 1:
            break
        if h[0] >= h[1]:
            cnt += 1
            h.pop(0)
        else:
            h.pop(0)
            break
    ans = max(ans, cnt)
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
print(int(((1 + 5**(1/2)) / 2)**(n) + ((1 - 5**(1/2)) / 2)**(n)))
Problem p03254 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np


def main(n, x, a):
  cnt = 0
  for j, i in enumerate(a):
    x -= i
    if x < 0:
      break
    elif j == n-1 and x > 0:
      break
    cnt += 1
  return cnt

n, x = map(int, readline().split())
a = np.sort(np.array(readline().split(), np.int64))
print(main(n, x, a))

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

@jit
def main(n, x, a):
  cnt = 0
  for i in a:
    x -= i
    if x <= 0:
      break
    elif i == a[-1] and x > 0:
      break
    cnt += 1
  return cnt

n, x = map(int, readline().split())
a = np.sort(np.array(readline().split(), np.int64))
print(main(n, x, a))
Problem p03261 (python)

Fixed submission:
import sys
import numpy as np
import collections as cl
import itertools as it
# import more_itertools as mit
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(100000)

n = int(readline())
w = [input().strip() for _ in range(n)]
dic = set()

for num, i in enumerate(w):
    if num == 0:
        dic.add(i)
        continue
    if i in dic or w[num-1][-1] != i[0]:
        print('No')
        sys.exit()
    dic.add(i)
print('Yes')

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
import collections as cl
import itertools as it
# import more_itertools as mit
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(100000)

n = int(readline())
w = list(readlines().split())
dic = set()

for i in w:
    if i == 0:
        dic.append(i)
        continue
    if i in dic or dic[i-1][-1] != dic[i][0]:
        print('No')
        sys.exit()
    dic.append(i)
print('Yes')
Problem p03999 (python)

Fixed submission:
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def calc(s, bit):
    split_list = [0]
    ans = 0
    for i in range(len(s)-1):
        if 2**i & bit:
            split_list.append(i+1)
    if split_list == [0]:
        return int(s)
    for j, i in enumerate(split_list):
        if j == len(split_list)-1:
            ans += int(s[i:])
            break
        ans += int(s[i:split_list[j+1]])
    return ans

def main(s):
    wa = 0
    for i in range(2**(len(s)-1)):
        wa += calc(s, i)
    return wa

s = input()
print(main(s))

Buggy submission (verdict: Runtime Error):
import sys
import itertools


a, b, c, d = list(input())

lst = ['-', '+']
for i, j, k in itertools.product(range(2), range(2), range(2)):
    ans = int(a)
    if i:
        ans += int(b)
    else:
        ans -= int(b)
    if j:
        ans += int(c)
    else:
        ans -= int(c)
    if k:
        ans += int(d)
    else:
        ans -= int(d)
        
    if ans == 7:
        print(a,lst[i],b,lst[j],c,lst[k],d,'=7',sep='')
        sys.exit()
Problem p02582 (python)

Fixed submission:
s=input()
for i in range(4)[::-1]:
    if "R"*i in s:
        print(i)
        break

Buggy submission (verdict: Runtime Error):
N, X, T = map(int, input().split())
y = N // X
c = N % X
print((y * T + T) if c else (y * T))
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
A = int(input("A="))
B = int(input("B="))
if 1 <= A <=100 and 1 <= B <=100:
    c = A * B
    print(c)
else:
    print("Error")
Problem p03126 (python)

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

listA = [list(map(int, input().split())) for j in range(n)]

ans = 0


for a in range(1, m+1):
    ok = True
    for i in range(n):
        if a not in listA[i][1:]:
            ok = False
    if ok:
        ans += 1



print(ans)

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

listA = [[list(map(int, input().split()))] for j in range(n)]

ans = 0


for a in range(m):
    for i in range(n):
        listA[i].pop(0)
        if a in listA[i]:
            ans += 1


print(ans)
Problem p03240 (python)

Fixed submission:

N = int(input())

X = [list(map(int, input().split())) for i in range(N)]

X.sort(key = lambda item: item[2] ,reverse = True)

for i in range(101):
    for j in range(101):
        h = X[0][2] + abs(X[0][0] - i) + abs(X[0][1] - j)

        ok = True
        for k in range(N):
            if X[k][2] != max((h - abs(X[k][0] - i) - abs(X[k][1] - j)), 0):
                ok = False

        if ok:
            print(i, j, h)
            exit()

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

X = [list(map(int, input().split())) for i in range(N)]

X.sort(key = lambda item: item[2] ,reverse = True)

for i in range(101):
    for j in range(101):
        h = X[0][2] + abs(X[0][0] - i) + abs(X[0][1] - j)
        
        ok = True
        for k in range(N):
            if X[0][2] != h - abs(X[k][0] - i) - abs(X[k][1] - j)
                ok = False
        
        if ok:
            print(i,j)
            exit()