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

Fixed submission:
x = list(map(int,input().split()))
print (x.index(0)+1)

Buggy submission (verdict: Runtime Error):
a,b =map(int,input().split())
c = 1
for i in range(0,a+1):
    if 2*i+4*(a-i) ==b:
      c = 0
      break
if c ==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b =map(int,input().split())
c = 1
for i in range(a):
  if (b-2*i)%4==0:
    c = 0
    break
if c ==1:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a,b =map(int,input().split())
c = 1
for i in range(a-1):
  if (b-2*i)%4==0:
    c = 0
    break
if c ==1:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a,b =map(int,input().split())
c = 1
for i in range(a-1):
  if (b-2*i)%4==0:
    c = 0
    break
if c ==1:
  print("No")
else:
  print("Yes")
Problem p02640 (python)

Fixed submission:
a,b =map(int,input().split())
c = 1
for i in range(0,a+1):
    if 2*i+4*(a-i) ==b:
      c = 0
      break
if c ==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b =map(int,input().split())
c = 1
for i in range(0,a):
  for k in range(0.a-i):
    if 2*i+4*k ==b:
      c = 0
      break
if c ==0:
  print("Yes")
else:
  print("No")
Problem p02641 (python)

Fixed submission:
x,n=map(int,input().split())
l=list(map(int,input().split()))
a=0
for i in range(100):
    if x-i not in l:
        ans=x-i
        a=i+1
        break
for i in range(100):
    if x+i not in l:
        ansb=x+i
        ab=i+1
        break
if a>ab:
    print(ansb)
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
s = list(map(int,input().split()))
t = 0
h = 0
a = s.pop(0)
b = s.pop(0)
print(a)
print(b)
d = 0
if b ==0:
  print(a)
else:
  for i in range(a+1,a+2+b):
    c = 1
    for k in range(0,b):
      if i == s[k]:
        c = 0
        break
    if c==1:
      t = i
      break
  for i in range(a-1,a-2-b,-1):
    c = 1
    for k in range(0,b):
      if i == s[k]:
        c = 0
        break
    if c==1:
      h = i
      break
  if abs(t-a)>=abs(h-a):
    print (h)
  else:
    print(t)

Buggy submission (verdict: Runtime Error):
s = list(map(int,input().split()))
t = 0
h = 0
a = s.pop(0)
b = s.pop(0)
print(a)
print(b)
d = 0
for i in range(a+1,a+2+b):
  c = 1
  for k in range(0,b):
    if i == s[k]:
      c = 0
      break
  if c==1:
    t = i
    break
for i in range(a-1,a-2-b,-1):
  c = 1
  for k in range(0,b):
    if i == s[k]:
      c = 0
      break
  if c==1:
    h = i
    break
if abs(t-a)>=abs(h-a):
  print (h)
else:
  print(t)
Problem p02642 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
M = 10**6 + 1
cnt = [0] * M
for a in A:
    if cnt[a] != 0:
        cnt[a] += 1
        continue
    for b in range(a, M, a):
        cnt[b] += 1
ans = 0
for a in A:
    if cnt[a] == 1:ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(map(int,input().split()))
t = s.pop(0)
s.sort()
d = 0
for i in range(0,t):
  c = 1
  for k in range(0,i):
    if s[i]%s[k]==0:
      c = 0
      break
  if c == 1:
    d = d+1
print(d)

Buggy submission (verdict: Runtime Error):
s = list(map(int,input().split()))
t = s.pop(0)
s.sort()
c = 1
d = 0
for i in range(t):
  for k in range(0,i):
    if s[i]%s[k]==0:
      c = 0
      break
  if c == 1:
    d = d+1
print(d)

Buggy submission (verdict: Runtime Error):
s = list(map(int,input().split()))
t = s.pop(0)
s.sort()
s.reverse()
c = 1
d = 1
for i in range(t):
  for k in range(i+1,t):
    if s[i]%s[k]==0:
      c = 0
      break
  if c == 1:
    d = d+1
print(d)
Problem p02817 (python)

Fixed submission:
s = [x.strip() for x in input().split()]
print(s[1] + s[0])

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
print(a + b)
Problem p03264 (python)

Fixed submission:
K = int(input())

num_odd = K // 2 if K % 2 == 0 else K // 2 + 1
num_even = K // 2

print(num_odd * num_even)

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

num_odd = K // 2 if K % 2 == 0 else K // 2 + 1
num_even = K // 2

print(num_odd * num_even)
Problem p03485 (python)

Fixed submission:
import math
a, b = [int(x) for x in input().split()]
print(math.ceil((a + b) / 2))

Buggy submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10000)

s = input()
x, y = [int(x) for x in input().split()]

d = (
    (1, 0),
    (0, 1),
    (-1, 0),
    (0, -1),
)

def next_dr(dr):
    def fix(dr):
        if dr == -1:
            return 3
        if dr == 4:
            return 0
        return dr
    return fix(dr - 1), fix(dr + 1)

def next_dr_set(dr_set, l):
    if l == 0:
        return dr_set
    _next_dr_set = set()
    for dr in dr_set:
        _next_dr_set.update(set(next_dr(dr)))
    return next_dr_set(_next_dr_set, l - 1)

def next_dr_list(dr, l):
    dr_set = next_dr_set(set([dr]), l)
    return list(dr_set)

def _next_dr_list(dr, l):
    if l == 0:
        return [dr]
    if dr % 2 == 0:
        if l % 2 == 0:
            return [0, 2]
        else:
            return [1, 3]
    else:
        if l % 2 == 0:
            return [1, 3]
        else:
            return [0, 2]

def dfs(s, a, b, dr):
    # print("called")
    # print(s)
    # print(a)
    # print(b)
    # print(dr)
    if s == '':
        return x == a and y == b

    if s[0] == 'F':
        dx, dy = d[dr]
        a += dx
        b += dy
        return dfs(s[1:], a, b, dr)
    else:
        l = s.find('F')
        if l == -1:
            return x == a and y == b

        dr_list = _next_dr_list(dr, l)
        for next_dr in dr_list:
            if dfs(s[l:], a, b, next_dr):
                return True

        return False

ans = "Yes" if dfs(s, 0, 0, 0) else "No"
print(ans)

Buggy submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10000)

s = input()
x, y = [int(x) for x in input().split()]

d = (
    (1, 0),
    (0, 1),
    (-1, 0),
    (0, -1),
)

def next_dr(dr):
    def fix(dr):
        if dr == -1:
            return 3
        if dr == 4:
            return 0
        return dr
    return fix(dr - 1), fix(dr + 1)

def dfs(s, a, b, dr):
    # print("===")
    # print(s)
    # print(a, b)
    # print(dr)
    # print(x == a and y == b)

    if s == '':
        return x == a and y == b

    if s[0] == 'F':
        dx, dy = d[dr]
        a += dx
        b += dy
        return dfs(s[1:], a, b, dr)
    else:
        next_dr1, next_dr2 = next_dr(dr)
        return dfs(s[1:], a, b, next_dr1) or dfs(s[1:], a, b, next_dr2)

ans = "Yes" if dfs(s, 0, 0, 0) else "No"
print(ans)
Problem p02640 (python)

Fixed submission:
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    x,y = mi()
    flag = False
    for i in range(x+1):
        if i*2+(x-i)*4 == y:
            flag = True
    if flag:
        print(yes)
    else:
        print(no)



main()

Buggy submission (verdict: Runtime Error):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    x,y = mi()
    flag = False
    for i in range(x+1):
        if i*2+(x-i)*4 == y:
            flag = True
    if flag:
        print(yes)
    else:
        print(no)



main()


j
Problem p02641 (python)

Fixed submission:
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    x,n = mi()
    p = li()
    for i in range(100):
        if not x-i in p:
            print(x-i)
            exit()
        elif not x+i in p:
            print(x+i)
            exit()



main()

Buggy submission (verdict: Runtime Error):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    


main()
Problem p02717 (python)

Fixed submission:
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    x,y,z = mi()
    y,x = x,y
    z,x = x,z
    print(x,y,z)


main()

Buggy submission (verdict: Runtime Error):
#gcdは3.4.3だとfractionsにある
#from fractions import gcd

from math import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    a,b,c = mi()
    a,b = b,a
    a,c = c,a
    print(a,b,c)



main()
Problem p02741 (python)

Fixed submission:
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "YES"
no = "NO"




def main():
    k = ii()
    a = [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(a[k-1])



        
    


main()

Buggy submission (verdict: Runtime Error):
hogehoge
Problem p02795 (python)

Fixed submission:

#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

def main():
    h = ii()
    w = ii()
    n = ii()
    print(ceil(n/max(h,w)))




main()

Buggy submission (verdict: Runtime Error):

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

def main():
    h = ii()
    w = ii()
    n = ii()
    print(ceil(n/max(h,w)))




main()
Problem p02818 (python)

Fixed submission:
#from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    a,b,k = mi()

    if a-k>0:
        print(a-k,b)
    else:
        k-=a
        print(0,max(b-k,0))


main()

Buggy submission (verdict: Runtime Error):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    a,b,k = mi()

    if a-k>0:
        print(a-k,b)
    else:
        k-=a
        print(0,max(b-k,0))


main()
Problem p02911 (python)

Fixed submission:
#gcdは3.4.3だとfractionsにある
from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n,k,q = mi()
    alist = [0 for i in range(100005)]
    for i in range(q):
        a = ii()
        alist[a]+=1
    
    for i in range(1,n+1):
        if alist[i] > q-k:
            print('Yes')
        else:
            print('No')
    


main()

Buggy submission (verdict: Runtime Error):
from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n,k,q = mi()
    alist = [0 for i in range(100005)]
    for i in range(q):
        a = ii()
        alist[a]+=1
	for i in range(1,n+1):
        if alist[i] > q-k:
            print('Yes')
        else:
            print('No')
    


main()

Buggy submission (verdict: Runtime Error):
from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n,k,q = mi()
    alist = [0 for i in range(100005)]
    for i in range(q):
        a = ii()
        alist[a]+=1
   
  	for i in range(1,n+1):
        if alist[i] > q-k:
            print('Yes')
        else:
            print('No')
    


main()
Problem p02995 (python)

Fixed submission:
import fractions

a, b, c, d = map(int, input().split())
cd = (c * d) // fractions.gcd(c, d)
a = a - 1
ac = a // c
ad = a // d
acd = a // cd
bc = b // c
bd = b // d
bcd = b // cd

ans = (b - a) - (bc + bd - bcd - (ac + ad - acd))
print(ans)

Buggy submission (verdict: Runtime Error):
import math

a, b, c, d = map(int, input().split())
cd = (c * d) // math.gcd(c, d)
a = a - 1
ac = a // c
ad = a // d
acd = a // cd
bc = b // c
bd = b // d
bcd = b // cd

ans = (b - a) - (bc + bd - bcd - (ac + ad - acd))
print(ans)
Problem p03030 (python)

Fixed submission:
n = int(input())
town = []
for i in range(n):
    s, p = input().split()
    p = int(p)
    town.append([s, p, i + 1])

town.sort(key=lambda x: x[1], reverse=True)
town.sort(key=lambda x: x[0])

for i in town:
    print(i[2])

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

n = int(input())


splist1 = []
splist2 = []
for i in range(n):
    tmp,tmp2 = input().split()
    tmp2 = int(tmp2)
    splist1.append([tmp,i+1])
    splist2.append([tmp2,i+1])

splist1 = np.array(splist1)
splist2 = np.array(splist2)
splist1 = splist1[np.argsort(splist2[:, 0])[::-1]]

ans = splist1[np.argsort(splist1[:, 0],kind="stable")]

for i in ans:
    print(i[1])
Problem p03281 (python)

Fixed submission:
#from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    n = ii()
    cnt = 0
    for i in range(1,n+1):
        if not i%2:
            continue
        tmp = 0
        for j in range(1,i+1):
            if not i%j:
                tmp+=1
        if tmp == 8:
            cnt+=1
    print(cnt)


main()

Buggy submission (verdict: Runtime Error):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    n = ii()
    cnt = 0
    for i in range(1,n+1):
        if not i%2:
            continue
        tmp = 0
        for j in range(1,i+1):
            if not i%j:
                tmp+=1
        if tmp == 8:
            cnt+=1
    print(cnt)


main()
Problem p03381 (python)

Fixed submission:
from numpy import median
from copy import deepcopy

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

sx = sorted(x)
newl = deepcopy(sx)
del newl[0]
maxm = median(newl)
newl = deepcopy(sx)
del newl[-1]
minm = median(newl)

med = median(x)

for i in x:
    if i > med:
        print(int(minm))
    else:
        print(int(maxm))

Buggy submission (verdict: Runtime Error):
from numpy import median
from copy import deepcopy

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

sx = x.sorted()
newl = deepcopy(sx)
del newl[0]
bigm = median(newl)
newl = deepcopy(sx)
del newl[-1]
minm = median(newl)

med = median(x)

for i in x:
    if i > med:
        print(minm)
    else:
        print(maxm)

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

for i in range(n/2):
    print(x[n/2])

for i in range(n/2):
    print(x[(n-1)//2])
Problem p03400 (python)

Fixed submission:
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    n = ii()
    d, x = mi()
    a = []
    for i in range(n):
        tmp = ii()
        a.append(tmp)
    ans = 0
    for i in a:
        tmp = 1
        while tmp <= d:
            ans += 1
            tmp += i
    ans += x
    print(ans)


main()

Buggy submission (verdict: Runtime Error):
jfrom math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    n = ii()
    d, x = mi()
    a = []
    for i in range(n):
        tmp = ii()
        a.append(tmp)
    ans = 0
    for i in a:
        tmp = 1
        while tmp <= d:
            ans += 1
            tmp += i
    ans += x
    print(ans)


main()
Problem p03573 (python)

Fixed submission:
a,b,c = map(int, raw_input().split(" "))
if a == b:
    print c
elif b == c:
    print a
else: print b

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

points = []
pointsx = []
pointsy = []

smin = 0

for i in range(N):
    x,y = map(int, raw_input().split(" "))
    pointsx.append(x)
    pointsy.append(y)

spx = sorted(pointsx)

for i in range(N-K+1):
    for h in range(N-K-i+1):
        yneed = []
        for k in range(N):
            if pointsx[k]>=spx[i] and pointsx[k]<=spx[i+K+h-1]:
                yneed.append(pointsy[k])
        spy = sorted(yneed)
        ylength = 0
        xlength = spx[i+K+h-1]-spx[i]
        for k in range(len(spy) - K + 1):
            if ylength < spy[k+K-1]-spy[k]: ylength = spy[k+K-1]-spy[k]
        if smin == 0: smin = ylength * xlength
        elif smin > ylength * xlength:
            smin = ylength * xlength


print smin
Problem p03599 (python)

Fixed submission:
a,b,c,d,e,f = map(int, input().split(' '))

w = 0
s = 0
ratio = 0

for i in range((f // (b*100))+1):
    for j in range(((f-(i*b*100))//(a*100))+1):
        if i == 0 and j == 0:
            continue
        smax = min(f-(j*a+i*b)*100,(j*a+i*b)*e)
        sm = 0
        for k in range((smax//d)+1):
            sm = max(sm, k*d+c*((smax-(k*d))//c))
        if ratio <= sm/((j*a+i*b)*100+sm):
            ratio = sm/((j*a+i*b)*100+sm)
            w = (j*a+i*b)*100
            s = sm


print("%i %i" %(w+s,s))

Buggy submission (verdict: Runtime Error):

a, b, c, d, e, f = map(int, input().split())

w = 0
s = 0
ratio = 0

for i in range(31):
    for j in range(31):
        water = a*i + b*j
        for k in range(1501):
            l = 0
            hoge = 1024
            while hoge:
                nl = l+hoge
                sugar = k*c+nl*d
                if 0 < water and water*100 + sugar <= f and sugar <= water*e:
                    l = nl
                hoge >>= 1
            sugar = k*c+l*d
            if ratio <= sugar / (water*100+sugar):
                w = water*100
                s = sugar
                ratio = sugar / (water*100+sugar)

print("%d %d"%(w+s,s))

Buggy submission (verdict: Runtime Error):
, b, c, d, e, f = map(int, input().split())

w = 0
s = 0
ratio = 0

for i in range(31):
    for j in range(31):
        water = a*i + b*j
        for k in range(1501):
            l = 0
            hoge = 1024
            while hoge:
                nl = l+hoge
                sugar = k*c+nl*d
                if 0 < water and water*100 + sugar <= f and sugar <= water*e:
                    l = nl
                hoge <<= 2
            sugar = k*c+l*d
            if ratio <= sugar / (water*100+sugar):
                w = water*100
                s = sugar
                ratio = sugar / (water*100+sugar)

print("%d %d"%(w+s,s))
Problem p02606 (python)

Fixed submission:
L,R,D = list(map(int,input().split()))
ans=0
for i in range(L,R+1):
  if i % D ==0:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
ans=0
for i in range(1,1+N):
  if (i % 2 != 0) and (a[i-1] % 2 != 0):
    ans += 1
print(ans)
Problem p02675 (python)

Fixed submission:
N = str(input())
hon = [2,4,5,7,9]
 
for i in hon:
    if N[-1] == str(i):
        print("hon")
        exit()

if N[-1] == "3":
    print("bon")
else:
    print("pon")

Buggy submission (verdict: Runtime Error):
import math
A,B,H,M = map(int,input().split())
# long 0.25rad/m short 6rad/m
deg = abs(6*M-0.5*(60*H+M))
ans = (A**2 + B**2 - 2*A*B*math.cos(math.radians(deg))) ** (1/2)
print(ans)
Problem p02582 (python)

Fixed submission:
s=input()

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'SSS' in s:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
s=input()
if s=='RRR':
    print(3)
elif s=='RRS':
    print(2)
elif s=='RSR':
    print(1)
elif s=='SRR':
    pront(2)
elif s=='SSR':
    print(1)
elif s=='SRS':
    print(1)
elif s=='RSS':
    print(1)
elif s=='SSS':
    print(0)

Buggy submission (verdict: Runtime Error):
s=input()
if s=='RRR':
    print(3)
elif s=='RRS':
    print(2)
elif s=='RSR':
    print(1)
elif s=='SRR':
    pront(2)
elif s=='SSR':
    print(1)
elif s=='SRS':
    print(1)
elif s=='RSS':
    print(1)
elif s=='SSS':
    print(0)

Buggy submission (verdict: Runtime Error):
s=input()
if s=='RRR':
    print(3)
elif s=='RRS':
    print(2)
elif s=='RSR':
    print(1)
elif s=='SRR':
    pront(2)
elif s=='SSR':
    print(1)
elif s=='SRS':
    print(1)
elif s=='RSS':
    print(1)
else :print(0)
Problem p02658 (python)

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

ans=1

if 0 in A:
    print(0)
else :
    for i in range(n):
        ans*=A[i]
        if ans > 10**18:
            break

    if ans>10**18:
        print(-1)
    else :
        print(ans)

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

ans=1
for i in range(n):
    ans*=A[i]
    if ans > 10**18
    break

if ans>10**18:
    print(-1)
else :
    print(ans)