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

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
ans = 0
for i in range(n):
    for j in range(i,i+2):
        tmp = b[i]
        b[i] -= a[j]        
        if b[i]<=0:
            ans += tmp
            a[j] -= tmp
            break
        else:
            ans += a[j]
            a[j] = 0
            
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(n):
    for j in range(i,i+2):
        tmp = b[i]
        b[i] -= a[j]        
        if b[i]<=0:
            ans += tmp
            a[j] -= tmp
            break
        else:
            ans += a[j]
            a[j] = 0
            
print(ans)
Problem p03207 (python)

Fixed submission:
num = int(input())
prices = []
 
for i in range(num):
  prices.append(int(input()))

max_i=0
max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i
 
sum=0
for i in range(num):
  if i==max_i:
    sum += int(prices[i]/2)
  else:
    sum += prices[i]

print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
prices = []

for i in range(num):
  prices[i].append(input())

max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i

sum=0
for i in range(num):
  if i==max_i:
    sum = sum + int(prices[i]/2)
  else:
    sum = sum + prices[i]
Problem p02629 (python)

Fixed submission:
N = int(input())
com = [0]
a = 0
v = 0
j = 0
str1 = "abcdefghijklmnopqrstuvwxyz"

if N < 27:
    print(str1[N-1])
else:
    for i in range(1,13):
        a += 26**i
        com.append(a)
    for i in range(13):
        if N < com[i]+1:
            v = com[i-1]
            j = i
            break
    N = N - v - 1
    ans = []
    for i in range(j-1,-1,-1):
        ans.append(str1[N//(26**i)])
        if N >= 26**i:
            N = N - N//(26**i) * (26**i)

    print("".join(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
com = [0]
u = [i+1 for i in range(16)]
a = 0
v = 0
j = 0
str1 = "abcdefghijklmnopqrstuvwxyz"

if N < 27:
    print(str1[N-1])
else:
    for i in range(1,17):
        a += 26**i
        com.append(a)
    for i in range(17):
        if N < com[i]+1:
            v = com[i-1]
            j = i
            break
    N = N - v
    ans = []
    for i in range(j-1,-1,-1):
        if i == 0:
            ans.append(str1[N-1])
        else:
            ans.append(str1[N//(26**i)])
        if N >= 26**i:
            N -= N//(26**i) * 26**i

    print("".join(ans))
Problem p02633 (python)

Fixed submission:
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

ex=[60,120]

if(x in ex):
    x=180-x
    ans=360//math.gcd(360,x)
print(ans)
#for i in range(1,180):
#    if(360//math.gcd(360,i)==6):
#        print(i,360//math.gcd(360,i))
#    if(i==x):
        #print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

ex=[60,120]

if(x in ex):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    if(360//math.gcd(360,i)==6):
#        print(i,360//math.gcd(360,i))
#    if(i==x):
        #print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

if(ans>=6):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    if(360//math.gcd(360,i)<10):
#        print(i,360//math.gcd(360,i))
#    if(i==x):
#        print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

if(ans>=8):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    if(360//math.gcd(360,i)<10):
#        print(i,360//math.gcd(360,i))
#    if(i==x):
#        print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

if(ans>=5):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    print(i,"°",360//math.gcd(360,i))
#    if(i==x):
#        print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

if(ans>=10):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    print(i,"°",360//math.gcd(360,i))
#    if(i==x):
#        print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

if(ans>=90):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    print(i,"°",360//math.gcd(360,i))
#    if(i==x):
#        print("問題の箇所",x,ans)

Buggy submission (verdict: Runtime Error):
import math
x=int(input())
x=180-x

if(x>90):
    print(1//0)

print(360//math.gcd(360,x))
Problem p02834 (python)

Fixed submission:
import sys

def jisin(gen,mae,huka):
    hukasa[gen]=huka
    for c in tens[gen]:
        if(c!=mae):
            jisin(c,gen,huka+1)
    return

def kyokudai(gen,mae):
    dai=0
    if(len(tens[gen])==1 and mae!=-1):
        dai=hukasa[gen]
        #print(dai)
    else:
        for c in tens[gen]:
            if(c!=mae):
                dai=max(dai,kyokudai(c,gen))
    saisin[gen]=dai
    #print(gen,dai)
    return dai

def oikake(gen):
    miti.append(gen)
    if(hukasa[gen]==0):
        return
    for c in tens[gen]:
        if(hukasa[c]==hukasa[gen]-1):
            oikake(c)

sys.setrecursionlimit(10**6)
n,u,v=map(int,input().split())
u-=1
v-=1
tens=[[]for i in range(n)]
hukasa=[0]*n
saisin=[0]*n

for i in range(n-1):
    s,t=map(int,input().split())
    tens[s-1].append(t-1)
    tens[t-1].append(s-1)

#print(tens)

jisin(v,-1,0)
#print(hukasa)
kyokudai(v,-1)
#print(saisin)

miti=[]
oikake(u)
l=len(miti)-1
#print(miti)
#print(l)

ans=saisin[miti[l//2]]
print(ans-1)

Buggy submission (verdict: Runtime Error):
def jisin(gen,mae,huka):
    hukasa[gen]=huka
    for c in tens[gen]:
        if(c!=mae):
            jisin(c,gen,huka+1)
    return

def kyokudai(gen,mae):
    dai=0
    if(len(tens[gen])==1 and mae!=-1):
        dai=hukasa[gen]
        #print(dai)
    else:
        for c in tens[gen]:
            if(c!=mae):
                dai=max(dai,kyokudai(c,gen))
    saisin[gen]=dai
    #print(gen,dai)
    return dai

def oikake(gen):
    miti.append(gen)
    if(hukasa[gen]==0):
        return
    for c in tens[gen]:
        if(hukasa[c]==hukasa[gen]-1):
            oikake(c)

n,u,v=map(int,input().split())
u-=1
v-=1
tens=[[]for i in range(n)]
hukasa=[0]*n
saisin=[0]*n

for i in range(n-1):
    s,t=map(int,input().split())
    tens[s-1].append(t-1)
    tens[t-1].append(s-1)

#print(tens)

jisin(v,-1,0)
#print(hukasa)
kyokudai(v,-1)
#print(saisin)

miti=[]
oikake(u)
l=len(miti)-1
#print(miti)
#print(l)

ans=saisin[miti[l//2]]
print(ans-1)
Problem p02552 (python)

Fixed submission:
x = int(input())
if x == 1:
  print("0")
else:print("1")

Buggy submission (verdict: Runtime Error):
print("1") if input() == 0; else("0")
Problem p02594 (python)

Fixed submission:
n = int(input())
if n >= 30:
  print("Yes")
  exit()
print("No")

Buggy submission (verdict: Runtime Error):
"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from functools import lru_cache, cmp_to_key
from collections import defaultdict as dd, deque, Counter as C
from bisect import bisect_left as bl, bisect_right as br, bisect
from heapq import heapify, heappop, heappush
# from math import sqrt
from math import ceil, log, floor
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var, end="\n"): sys.stdout.write(str(var)+end)
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, k = sp()
arr = L()
low, high = 1, max(arr)
answer = max(arr)
while low <= high:
    mid = (low + high) >> 1
    req = 0
    for i in range(n):
        if arr[i] <= mid:
            continue
        else:
            temp = arr[i] // mid
            req += temp
    if req <= k:
        answer = min(answer, mid)
        high = mid - 1
    else:
        low = mid + 1
out(answer)
Problem p02726 (python)

Fixed submission:
"""
    Template written to be used by Python Programmers.
    Use at your own risk!!!!
    Owned by enraged(rating - 5 star at CodeChef and Specialist at Codeforces).
"""
import sys
from functools import lru_cache
from collections import defaultdict as dd
def data(): return sys.stdin.readline().strip()
def out(var): sys.stdout.write(str(var))
def outln(var): sys.stdout.write(str(var)+"\n")
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, x, y = sp()
dp = dd(int)
for i in range(1, n):
    for j in range(i+1, n+1):
        answer = min(abs(j-i), abs(x-i)+1+abs(j-y), abs(y-i)+1+abs(j-x))
        dp[answer] += 1
for i in range(1, n):
    outln(dp[i])

Buggy submission (verdict: Runtime Error):
n, x, y = map(int, input().split())
graph = dict()
for i in range(1, n+1):
    if i not in graph.keys():
        graph[i] = set()
    if i < n:
        graph[i].add(i+1)
    if i > 1:
        graph[i].add(i-1)
graph[x].add(y)
graph[y].add(x)
dist = [[]]


def bfs(source):
    q = deque()
    q.append(source)
    d = [pow(10, 4)] * (n+1)
    d[source] = 0
    vis = [0] * (n+1)
    while len(q):
        temp = q.popleft()
        for i in graph[temp]:
            if not vis[i]:
                q.append(i)
                vis[i] = 1
            d[i] = min(d[temp]+1, d[i])
    dist.append(d)


for i in range(1, n+1):
    bfs(i)


dp = dict()
for i in range(1, n):
    for j in range(i+1, n+1):
        if dist[i][j] not in dp.keys():
            dp[dist[i][j]] = 0
        dp[dist[i][j]] += 1

for i in range(1, n):
    if i not in dp.keys():
        print(0)
    else:
        print(dp[i])
Problem p02552 (python)

Fixed submission:
n=int(input())
if(n==1):
  print(0)
else:
  print(1)

Buggy submission (verdict: Runtime Error):

if x == 0:
 print(1)
else:
 print(0)

Buggy submission (verdict: Runtime Error):
if x == 0:
 print(1)
else:
 print(0)
Problem p02570 (python)

Fixed submission:
a, b, c = map(int, input().split())
 
if b * c >= a:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
D = int(input())
T = int(input())
S = int(input())




time=D/S
if time <= T:
    print("yes")
else:
    print("no")
Problem p02693 (python)

Fixed submission:
k=int(input())
a,b= map(int, input().split())
q=0
 
for i in range(1,1000):
  if a<=k*i and k*i<=b:
    print('OK')
    q=1
    break
 
if q==0:
  print('NG')

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

if q == 0:
    print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

if q == 0:
    print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

if q == 0:
    print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

if q == 1:
    print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """


if A==B:
    if A%K==0:
        print("OK")
    else:
        print("NG")

num=A
while num <= B:

    if num%K == 0:
        print("OK") 
        exit()
    if num==B:
        print("NG")
        exit()
    num += 1

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """


if A==B:
    if A%K==0:
        print("OK")
    else:
        print("NG")

num=A
while num <= B:
    num += 1
    if num%K == 0:
        print("OK") 
        exit()
    if num==B:
        print("NG")
        exit()

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=7
A=500
B=600 """


if A==B:
    if A%K==0:
        print("OK")
    else:
        print("NG")

num=A
while num <= B:
    num += 1
    if num%K == 0:
        print("OK") 
        break
    if num==B:
        print("NG")
        break

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=1
A=11
B=11  """


if A==B:
    if A%K==0:
        print("OK")
    else:
        print("NG")

num=A
while num <= B:
    num += 1
    if num%K == 0:
        print("OK") 
        break
    if num==B:
        print("NG")
        break

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
""" K=7
A=500
B=600 """



num=A
while num <= B:
    num += 1
    if num%K == 0:
        print("OK") 
        break
    if num==B:
        print("NG")
        break
Problem p02577 (python)

Fixed submission:
N=int(input())
if N%9 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
if n % 9 == 0:
  print("Yes")
 else:
  print("No")
Problem p02596 (python)

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    K = int(input())
    x = 0
    i = 0
    if K % 2 == 0 or K % 5 ==  0:
        print(-1)
        exit()
    
    while True:
        x = (x * 10 + 7) % K
        i += 1
        if x == 0:
            print(i)
            break


    

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    K = int(input())
    x = 0
    if K % 2 == 0 or K % 5 ==  0:
        print(-1)
  
    while True:
        x = (x * 10 + 7) % K
        i += 1
        if x == 0:
            print(i + 1)
            break


    

if __name__ == "__main__":
    main()
Problem p02771 (python)

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

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if a = b:
    if a = c:
        print("No")
    else:
        print("Yes")
elif a = c:
    print("Yes") 
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if a = b:
    print("Yes")
elif a = c:
    print("Yes") 
else:
    print("No")
Problem p02777 (python)

Fixed submission:
S, T= input().split()
A, B= map(int,input().split())
U = input()
if U == S:
    A += -1
else:
    B += -1
print(A, B)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
P = [(int(x) + 1) / 2 for x in input().split()]
l = []
for i in range(N - K + 1):
    l.append(sum(P[i:(i+K)]))
print('{:.12f}'.format(max(l))) #12桁まで指定
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K]+"...")

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K]+"...")7
nikoandsolstice
Problem p02723 (python)

Fixed submission:
S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = int(input())
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
Problem p02570 (python)

Fixed submission:
D,T,S = [int(n) for n in input().split()]

if D/S <= T:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
def multmod(a,b,m):
  ans = 0
  a = a % m
  
  while b:
    if (b & 1): # odd
      ans = (ans + a) % m
    
    a = (2 * a) % m
    b >>= 1 # b = b / 2
    
  return ans

n = int(input())
S = [int(a) for a in input().split()]
divisor = 10**9 + 7
tot = 0
a,b = 0,0
arr_sum = sum(S) #% divisor
arr_ssq = arr_sum*arr_sum % divisor
isq_sum = 0
for i in range(n):
  isq_sum += S[i]*S[i] #% divisor
  
#isq_sum = isq_sum % divisor
tot = (arr_ssq - isq_sum)//2 % divisor

print(tot)
Problem p02754 (python)

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

a = N // (A+B)
b = N % (A+B)

ans = a * A + min(b,A)
print(ans)

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

s = ''

while N>len(s):
    s += 'b' * A
    s += 'r' * B

print(s[:N].count('b'))
Problem p02688 (python)

Fixed submission:
n,k = map(int , input().split())
a = []
from collections import defaultdict as dd
dc = dd(lambda : 0)
for i in range(k):
  d = int(input())
  a = list(map(int , input().split()))
  for i in a:
    dc[i] += 1
cnt = 0
for i in range(1 , n + 1):
  if dc[i] == 0:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n,k = map(int , input().split())
a = []
from collections import defaultdict as dd
dc = dd(lambda : 0)
for i in range(k):
  d = int(input())
  a = list(map(int , input().split()))
  for i in a:
    dc[i] += 1
cnt = 0
for i in range(1 , n + 1):
  if d[i] == 0:
    cnt += 1
print(cnt)
Problem p02596 (python)

Fixed submission:
K=int(input())
i=1
if K%2==0 or K%5==0:
  print(-1)
elif K%7==0:
  L=9*K/7
  b=10
  while True:
    b=b%L
    if b==1:
      print(i)
      break
    b=b*10
    i+=1
else:
  L=9*K
  b=10
  while True:
    b=b%L
    if b==1:
      print(i)
      break
    b=b*10
    i+=1

Buggy submission (verdict: Runtime Error):
K=int(input())
i=1
if K%2==0 or K%5==0:
  print(-1)
elif K%7==0:
  L=9*K/7
  b=10
  while True:
    b=a%L
    if b==1:
      print(i)
      break
    b=b*10
    i+=1
else:
  L=9*K
  b=10
  while True:
    b=b%L
    if b==1:
      print(i)
      break
    b=b*10
    i+=1

Buggy submission (verdict: Runtime Error):
b=0
i=0
if K%2==0:
  print(-1)
else:
  while True:
    a=10**i
    b=b+7*a
    i+=1
    if b%K==0:
      print(i)
      break
Problem p02547 (python)

Fixed submission:
n=int(input())

a = 0
for i in range(n):
    li = input().split()
    if(li[0]==li[1]):
        a+=1
    elif(a<3):
        a=0
    else:
        print("Yes")
        exit()
if(a>2):
    print("Yes")
    exit()

print("No")

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

a = 0
for i in range(n):
    li = input().split()
        a+=1
    elif(a<3):
        a=0
    else:
        print("Yes")
        exit()
if(a>2):
    print("Yes")
    exit()

print("No")
Problem p02897 (python)

Fixed submission:
a = int(input())
if a%2==0:
    print("0.5")
else:
    b = a+1
    b = b/2
    print(b/a)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
for i in range(1,n+1):    
    c = a.index(i)
    c += 1
    print(c,end=' ')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = list()
for i in range(n+1):
    if i==0:
        continue
    else:
        c = a.index(i)
        c = c+1
        b.append(c)
for j in b:       
    print(j,end=' ')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = list()
for i in range(n+1):
    if i==0:
        continue
    else:
        c = a.index(i)
        c = c+1
        b.append(c)
for j in b:       
    print(j,end=' ')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = list()
for i in range(n+1):
    if i==0:
        continue
    else:
        c = a.index(i)
        c = c+1
        b.append(c)
for j in b:       
    print(j,end=' ')
Problem p02711 (python)

Fixed submission:
n = input()
if '7' in n : print('Yes')
else : print('No')

Buggy submission (verdict: Runtime Error):
n = input()
if '7' in n : print('Yes')
else : print('No')127
Problem p02595 (python)

Fixed submission:
import math

n, d = map(int, input().split())
x = [list(map(int,input().split())) for i in range(n)]

ans = 0
for i,j in x:
    if math.sqrt((i*i)+(j*j)) <= d:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n, d = map(int, input().split())
x = [list(map(int,input().split())) for i in range(n)]

ans = 0
for i,j in x:
    if (i**2)+(j**2)) <= d**2:
        ans += 1

print(ans)
Problem p02835 (python)

Fixed submission:
a, b, c = map(int, input().split())
print("bust" if a + b + c >= 22 else "win")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print("bust" a + b + c >= 22 else "win")
Problem p02916 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if j == i+1:
        ans += C[i-1]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if i == j+1:
        ans += C[i-1]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if i == j+1:
        ans += C[a-1]
print(ans)
Problem p02570 (python)

Fixed submission:
D,T,S=map(int,input().split())
t=D/S
if t<=T:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import math,sys,os,collections,functools
if(os.path.exists('input.txt')):
	sys.stdin=open('input.txt','r')
	sys.stdout=open('output.txt','w')
for testcase in range(int(input())):
	D,T,S=map(int,input().split())
	t=D/S
	if t<=T:
		print('Yes')
	else:
		print('No')

Buggy submission (verdict: Runtime Error):
for testcase in range(int(input())):
	D,T,S=map(int,input().split())
	d=S*T
	if d>=D:
		print('Yes')
	else:
		print('No')

Buggy submission (verdict: Runtime Error):
for testcase in range(int(input())):
	D,T,S=map(int,input().split())
	speed=D/T
	if speed>=S:
		print('Yes')
	else:
		print('No')