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

Fixed submission:
N = int(input())
T,A = map(float,input().split())
H = list(map(int,input().split()))

dis = []
for i in range(N):
    dis.append(abs(A-(T-H[i]*0.006)))
print(dis.index(min(dis))+1)

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

num = 0
pre = 100000
for i in range(N):
    x = float(input())
    ave = T - x*0.006
    if abs(A-ave)<pre:
        pre = abs(A-ave)
        num = i
print(num)

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

num = 0
pre = A
for i in range(N):
    x = float(input())
    ave = T - x*0.006
    if abs(A-ave)<pre:
        pre = abs(A-ave)
        num = i
print(num)

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

num = 0
pre = A
for i in range(N):
    x = float(input())
    ave = T - x*0.006
    if abs(A-ave)<pre:
        pre = abs(A-ave)
        num = i
print(i)

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

num = 0
pre = A
for i in range(N):
    x = float(input())
    ave = T - x*0.006
    if abs(A-ave)<pre:
        pre = abs(A-ave)
        num = i
print(i)

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

num = 0
pre = A
for i in range(N):
    x = input()
    ave = T - x*0.006
    if abs(A-ave)<pre:
        pre = abs(A-ave)
        num = i
print(i)
Problem p03029 (python)

Fixed submission:
A,P = map(int, input().split())
print((3*A+P)//2)

Buggy submission (verdict: Runtime Error):
N=int(input())
book=[]
for i in range(N):
    s,p =input().split()
    book.append((s,int(p),i))
    
s=sorted(book, key=lambda x: ( x[0],-x[1]))
for i in range(N):
    print(s[i][2]+1)
Problem p03854 (python)

Fixed submission:
s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
s = input()[::-1]
words = [w[::-1] for w in ['dream', 'dreamer', 'erase', 'eraser']]

can = 'YES'
while s:
    print(s)
    match_any = False
    for w in words:
        if s.startswith(w):
            s = s.replace(w, '', 1)
            match_any = True
            break
    if not match_any:
        can = 'NO'
        break
print(can)
Problem p03029 (python)

Fixed submission:
a,p = map(int,input().split())

tips = a * 3 + p
pie = tips // 2

print(pie)

Buggy submission (verdict: Runtime Error):
import numpy as np
import matplotlib.pyplot as plt

def main():
	a = int(input())
	p = int(input())

	tips = a * 3 + p
	pie = int(tips / 2)

	print(pie)

if __name__ == '__main__':
	main()

Buggy submission (verdict: Runtime Error):
import numpy as np
import matplotlib.pyplot as plt

def main():
	print('Input A')
	a = int(input())
	print('Input P')
	p = int(input())

	tips = a * 3 + p
	pie = int(tips / 2)

	print("output\n"+str(pie))


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

Fixed submission:
from sys import stdin

N = int(input())
lst = []
for i in range(N):
    city, score = stdin.readline().split()
    lst.append((city, int(score), i + 1))

lst.sort(key=lambda x: x[1], reverse=True)
lst.sort(key=lambda x: x[0])
for tup in lst:
    c, s, i = tup
    print(i)

Buggy submission (verdict: Runtime Error):
N = int(input())
lst = []
for i in range(N):
  city, score = map(int, input().split())
  lst.append((city, score, i+1))

lst.sort(key=lambda x: x[1], reverse=True)
lst.sort(key=lambda x: x[0])
for tup in lst:
  c, s, i = tup
  print(i)
Problem p03035 (python)

Fixed submission:
from sys import stdin

A, B = map(int, stdin.readline().split())
if A >= 13:
  print(B)
elif 12 >- A and A >= 6:
  print(B // 2)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
from sys import stdin

N, M = map(int, stdin.readline().split())
A = list(map(int, stdin.readline().split()))
for _ in range(M):
    B, C = map(int, stdin.readline().split())
    A.extend([C]*B)
A.sort(reverse=True)
ans = 0
for i in range(N):
    ans += A[i]

print(ans)

Buggy submission (verdict: Runtime Error):
from sys import stdin

A, B = map(int, stdin.readline().split())
if A >= 13:
  print(B):
elif 12 >= A >= 6:
  print(B // 2)
else:
  print(0)
Problem p03087 (python)

Fixed submission:
from sys import stdin

n, q = map(int, stdin.readline().split())
s = stdin.readline().strip()
counts = [0 for i in range(n)]
count = 0
for i in range(1, n):
    if s[i-1:i+1] == 'AC':
        count += 1
    counts[i] = count

for i in range(q):
    l, r = map(int, stdin.readline().split())
    print(counts[r-1] - counts[l-1])

Buggy submission (verdict: Runtime Error):
from sys import stdin
n, q = stdin.readline().split()
s = stdin.readline().strip()
count = 0
for i in range(q):
  l, r = map(int, stdin.readline().split())
  for j in range(l-1, r-1):
    if s[j] + s[j+1] == 'AC':
      count += 1
      
  print(count)
Problem p03102 (python)

Fixed submission:
from sys import stdin

N, M, C = map(int, stdin.readline().split())
B = list(map(int, stdin.readline().split()))
ans = 0
for i in range(N):
  A = list(map(int, stdin.readline().split()))
  temp = 0
  for j in range(M):
    temp += (A[j] * B[j])
  if temp + C > 0:
    ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
from sys import stdin

N, M, C = map(int, stdin.readline().split())
B = list(map(int, stdin.readline().split()))
ans = 0
for i in range(N):
  A = list(map(int, stdin.readline().split()))
  temp = 0
  for j in range(N):
    temp += A[j] * B[j]
  if temp + C > 0:
    ans += 1

print(ans)
Problem p03219 (python)

Fixed submission:
from sys import stdin

x, y = list(map(int, stdin.readline().split()))
print(x + y//2)

Buggy submission (verdict: Runtime Error):
from sys import stdin
from queue import PriorityQueue

PREFEC, CITIES = list(map(int, stdin.readline().split()))
pref = {str(key): PriorityQueue() for key in range(1, PREFEC+1)}
city = dict()
out = [0] * CITIES
for i in range(CITIES):
    p, c = stdin.readline().split()
    pref[p].put(c)
    dic = p + '0' + c
    city[dic] = i

for j in range(1, PREFEC+1):
    i = str(j)
    pref_index = 1
    while not pref[i].empty():
        si = pref[i].get()
        temp = i + '0' + si
        index = city[temp]
        sy = str(pref_index)
        p = i

        while len(p) != 6:
            p = '0' + p
        while len(sy) != 6:
            sy = '0' + sy

        out[index] = p + sy

        pref_index += 1

for o in out:
    print(o)
Problem p03974 (python)

Fixed submission:
from array import*;R=range;T=[0]*28;N=int(input());S=[[ord(C)-95 for C in input()]for _ in[0]*N];U=N*26**2*array('i',[0]);V=N*[0];Q=int(input())
for X in S:
	P=0
	for C in X:
		if T[P+C]==0:T[P+C]=len(T);T+=[0]*28
		T[P]+=1;P=T[P+C]
	T[P]+=1;T[P+1]=1
for I in R(N):
	P=0
	for C in S[I]:
		for A in R(26):
			X=T[P+A+2]
			if(A!=C-2)*X:U[676*I+26*A+C-2]+=T[X]
		V[I]+=T[P+1]
		P=T[P+C]
while Q:
	K,P=input().split();K=int(K)-1;P=[ord(C)-97 for C in P];X=1+V[K]
	for A in R(26):
		for B in R(A+1,26):
			X+=U[676*K+26*P[A]+P[B]]
	print(X);Q-=1

Buggy submission (verdict: Runtime Error):
import array;R=range;L=input;T=[0]*28;N=int(L());S=[];U=N*26**2*array.array('i',[0]);V=N*[0];Q=int(L())
for I in R(N):
	S+=[[ord(C)-95 for C in L()]];P=0
	for C in S[I]:
		if T[P+C]==0:T[P+C]=len(T);T+=[0]*28
		T[P]+=1;P=T[P+C]
	T[P]+=1;T[P+1]=1
while N:
	N-=1;P=0
	for C in S[N]:
		for A in R(26):
			X=T[P+A+2]
			if(A!=C-2)*X:U[676*N+26*A+C-2]+=T[X]
		V[N]+=T[P+1]
		P=T[P+C]
while Q:
	K,P=L().split();K=int(K)-1;P=[ord(C)-97 for C in P];X=1+V[K]
	for A in R(26):
		for B in R(A+1,26):
			X+=U[676*K+26*P[A]+P[B]]
	print(X);Q-=1
Problem p04043 (python)

Fixed submission:
print('YES' if sorted(input().split()) == ['5', '5', '7'] else 'NO')

Buggy submission (verdict: Runtime Error):
M=10**9+7;F=[pow(X,M-2,M)for X in range(2*10**5)];H,W,A,B=map(int,input().split());Z=C=1
for I in range(H-1):Z=C=C*(W+H-B-2-I)*F[I+1]%M
for I in range(1,H-A):C=C*(B-1+I)*F[I]*(H-I)*F[W+H-B-1-I]%M;Z=(Z+C)%M
print(Z)
Problem p03109 (python)

Fixed submission:
import datetime

x = input()
x_date = datetime.datetime.strptime(x, '%Y/%m/%d')

y = datetime.datetime(2019, 4, 30, 0, 0, 0)

if x_date <= y :
    print('Heisei')
else:
    print('TBD')

Buggy submission (verdict: Runtime Error):
import datetime

x = input()

y = datetime.date(2019, 4, 30)
x_date = datetime.date(x.replace('/', ','))

if x_date <= y
    print('Heisei')
else
    print('TBD')
Problem p03029 (python)

Fixed submission:
a,p=map(int,input().split())
print((a*3+p)//2)

Buggy submission (verdict: Runtime Error):
a,p = input().split()
int(a)
int(p)
print((a*3+p)//2)

Buggy submission (verdict: Runtime Error):
A = int(input())
P = int(input())
 
pi = round((A*3 + P)/2)
 
print(pi)

Buggy submission (verdict: Runtime Error):
A = input()
P = input()

pi = round((A*3 + P)/2)

print(pi)

Buggy submission (verdict: Runtime Error):

pi = round((A*3 + P)/2)




return pi

Buggy submission (verdict: Runtime Error):

pi = (A*3 + P)/2

return pi
Problem p03035 (python)

Fixed submission:
import sys
inp = list(map(int,input().split()))
A, B = inp[0], inp[1]
if A <= 5:
  print(0)
elif A <= 12:
  print(int(B/2))
else:
  print(B)

Buggy submission (verdict: Runtime Error):
import sys

A = sys.argv[1]
B = sys.argv[2]

if A <= 5:
  print(0)
elif A <= 12:
  print(int(B/2))
else:
  print(B)
Problem p03029 (python)

Fixed submission:
A, P = input().split()
print(int((3*int(A)+int(P))/2))

Buggy submission (verdict: Runtime Error):
A, P = input().split()
B = 3 * A + P
print(B/2)

Buggy submission (verdict: Runtime Error):
A,P = input().split()
print((3*A+P)/2)

Buggy submission (verdict: Runtime Error):
A, P = input().split()
print((3*A+P)/2)
Problem p03071 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = input().split()
# print(a)
# print(b)

if a > b:
    print(a + a - 1)
elif a < b:
    print(b + b - 1)
else:
    print(a + a)
Problem p03126 (python)

Fixed submission:
N, M = map(int, input().split())
data = []
for i in range(N):
    data.append(list(map(int, input().split())))
#print(data)
counter2 = 0
for i in range(1, M + 1):
    counter1 = 0
    for ans in data:
        num = ans[0]
        if i in ans[1 : num + 1]:
            counter1 += 1
        else:
            counter1 = 0
            break
    if counter1 == N:
        counter2 += 1
print(counter2)

Buggy submission (verdict: Runtime Error):
data = []
for i in range(N):
    data.append(list(map(int, input().split())))
#print(data)
counter1 = 0
counter2 = 0
for i in range(1, M + 1):
    for ans in data:
        num = ans[0]
        #print(ans[1 : num + 1])
        if i in ans[1 : num + 1]:
            counter1 += 1
        else:
            counter1 = 0
            break
    if counter1 == N:
        print(i)
        counter2 += 1
print(counter2)
Problem p03251 (python)

Fixed submission:
import sys
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

#intXlist = intYlist = []
intXlist = []
intYlist = []
for i in xlist:
    intXlist.append(int(i))
#intXlist.append(X)
for i in ylist:
    intYlist.append(int(i))
#intYlist.append(Y)

# print(max(intXlist))
# print(min(intYlist))

# mx = max(intXlist)
# my = min(intYlist)

# for z in range(X+1, Y+1):
#     return my <= mx:
#         print('No War')
#         sys.exit()
#     else:
#         continue
# print('War')


def judge(z):
    try:
        for i in xlist:
            i = int(i)
            if not i < z:
                return 0
            else:
                continue
        for j in ylist:
            j = int(j)
            if j < z:
                return 0
            else:
                if str(j) == ylist[-1]:
                    #print(z)
                    print('No War')
                    sys.exit()
    except Exception as e:
        print(e)
for z in range(X+1, Y+1):
    judge(z)
    if z == Y:
        print('War')

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

def judge(z):
    for i in xlist:
        i = int(i)
        if not i < z:
            return 0
    for j in ylist:
        j = int(j)
        if j < z:
            return 0
        else:
            if str(j) == ylist[-1]:
                print('No War')
                sys.exit()

for z in range(X+1, Y+1):
    judge(z)
    if z == Y:
        print('War')

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

def judge(z):
    for i in xlist:
        i = int(i)
        if not i < z:
            return 0
    for j in ylist:
        j = int(j)
        if j < z:
            return 0
        else:
            if str(j) == ylist[-1]:
                print('No War')
                sys.exit()

for z in range(X+1, Y+1):
    judge(z)
    if z == Y-1:
        print('War')
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
def divide(n):
    counter = 0
    counter1 = 0
    if n % 2 != 0:
        for i in range(1, n+1, 2):
            for j in range(1, i+1):
                if i % j == 0:
                    counter += 1
            if counter == 8:
                counter1 += 1
            counter = 0
    else:
        for i in range(1, n, 2):
            for j in range(1, i+1):
                if i % j == 0:
                    counter += 1
            if counter == 8:
                counter1 += 1
            counter = 0
    return counter1

                         
if __name__ == '__main__':
    n = int(input())
    print(divide(n))

Buggy submission (verdict: Runtime Error):

def main():
    n = int(input())

    
    
    def divide(n):
        counter = 0
        counter1 = 0
        if n % 2 != 0:
            for i in range(1, n+1, 2):
                for j in range(1, i+1):
                    if i % j == 0:
                        counter += 1
                if counter == 8:
                    counter1 += 1
                counter = 0
        else:
            for i in range(1, n, 2):
                for j in range(1, i+1):
                    if i % j == 0:
                        counter += 1
                if counter == 8:
                    counter1 += 1
                counter = 0
        return counter1

    print(divide(n))
                         
if __name__ == '__main__':
    main()
Problem p03037 (python)

Fixed submission:
#n idカード　m ゲート
n,m = map(int, input().split())
maxlist = []
minlist = []

for i in range(m):
	#l　ゲートの下限　r ゲートの上限
	l , r = list(map(int, input().split()))
	minlist.append(l)
	if r > 0:
		maxlist.append(r)

minid = max(minlist)
maxid = min(maxlist)
okgate = maxid - minid + 1

if okgate >= 0:
	print(okgate)
else:
	print(0)

Buggy submission (verdict: Runtime Error):
#n idカード　m ゲート
n,m = map(int, input().split())
maxlist = []
minlist = []

for i in range(m):
	#l　ゲートの下限　r ゲートの上限
	l , r = list(map(int, input().split()))
	minlist.append(l)
	if r > 0:
		maxlist.append(r)

minid = max(minlist)
maxid = min(maxlist)
okgate = maxid - minid + 1

if okegate >= 0:
	print(okgate)
else:
	print(0)
Problem p03029 (python)

Fixed submission:
from sys import stdin
arg = stdin.readline().rstrip().split()
a = int(arg[0])
p = int(arg[1])
a1 = a*3
print (int((a1+p)/2))

Buggy submission (verdict: Runtime Error):
import sys
a = sys.argv[1]
p = sys.argv[2]
a1 = a*3
print ((a1+p)/2)
Problem p03029 (python)

Fixed submission:
import sys

a, p = map(int, sys.stdin.readlines()[0].strip().split())
print((p + a * 3) // 2)

Buggy submission (verdict: Runtime Error):
import sys

a, p = map(int, sys.stdin.readlines()[0].strip)
print((p + a * 3) // 2)
Problem p03029 (python)

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

print((3 * A + P) // 2)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
    s, p = input().split()
    a.append((s, -int(p), i))
a.sort()

for _, _, i in a:
    print(i + 1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
    s, p = input().split()
    p = int(p)
    a.append((s, -int(p), i))
a.sort()

for _, _, i in a:
    print(i + 1)
Problem p03030 (python)

Fixed submission:
n = int(input())
a = []
for i in range(n):
    s, p = input().split()
    a.append((s, -int(p), i))
a.sort()

for _, _, i in a:
    print(i + 1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
    s, p = list(map(int, input().split()))
    a.append((s, -int(p), i))
a.sort()

for _, _, i in a:
    print(i + 1)
Problem p03035 (python)

Fixed submission:
a,b=map(int, input().split())
if a <= 5:
    print(0)
elif 6 <= a <= 12:
    print(b//2)
else:
    print(b)

Buggy submission (verdict: Runtime Error):
a, b =(int, input().split())
if 13 <= a:
  print(b)
elif 6 <= a <= 12:
  print(b//2)
else:
  print(0)
Problem p03607 (python)

Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(input()) for n in range(N)]
L = [False for i in range(max(A))]

for a in A:
    L[a] = not L[a]
print(sum(L))

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [False for i in range(100001)]
A = [int(input()) for n in range(N)]


for a in A:
    L[a] = not L[a]

print(sum(L))

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [False for i in range(100000)]
A = [int(input()) for n in range(N)]


for a in A:
    L[a] = not L[a]

print(sum(L))
Problem p03627 (python)

Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)

res = [0, 0]
tmp = -1
for a in A:
    if a == tmp:
        res.append(a)
        tmp = -1
    else:
        tmp = a
    if len(res) >= 4:
        break

res = sorted(res, reverse=True)

result = 1
for i in range(2):
    result *= res[i]

print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)

res = [0]
tmp = -1
for a in A:
    if a == tmp:
        res.append(a)
        tmp = -1
    else:
        tmp = a
    if len(res) > 2:
        break

res = sorted(res, reverse=True)

result = 1
for i in range(2):
    result *= res[i]

print(result)
Problem p03633 (python)

Fixed submission:
N = int(input())
T = [int(input()) for n in range(N)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


res = T[0]
for t in T:
    res = lcm(res, t)

print(res)

Buggy submission (verdict: Runtime Error):
import math

N = int(input())
T = [int(input()) for n in range(N)]


def lcm(a, b):
    return a * b // math.gcd(a, b)


res = T[0]
for t in T:
    res = lcm(res, t)

print(res)
Problem p03861 (python)

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


def f(n):
    if n >= 0:
        return n//x+1
    else:
        return 0

print(f(b)-f(a-1))

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


def f(n):
    if n >= 0:
        return n//x+1
    else:
        0

print(f(b)-f(a-1))
Problem p03962 (python)

Fixed submission:
print(len(set(input().split())))

Buggy submission (verdict: Runtime Error):
print(len(set(input().split()))
Problem p03029 (python)

Fixed submission:
if __name__ == '__main__':
    _input = input().split()

    pie = int((int(_input[0]) * 3 + int(_input[1]))/2)
    print(pie)

Buggy submission (verdict: Runtime Error):
from operator import itemgetter

if __name__ == '__main__':
    n = int(input())
    input_list = [input() for i in range(n)]
    restaurant_list = []
    for index, _input in enumerate(input_list):
        _restaurant_data = {'id': index + 1, 'region': _input.split()[0], 'point': int(_input.split()[1])}
        restaurant_list.append(_restaurant_data)

    restaurant_list.sort(key=itemgetter('point'), reverse=True)
    restaurant_list.sort(key=itemgetter('region'))
    for restaurant in restaurant_list:
        print(restaurant['id'])
Problem p03029 (python)

Fixed submission:
import math

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

if 0<=A and P<=100 :
    Pi = math.floor((3*A +P)/2)
    print(Pi)
else :
    print("ERROR")

Buggy submission (verdict: Runtime Error):
from operator import itemgetter

def input_list(num,args):
    for i in range(num):
        S,P = input().split()
        P=int(P)
        if 1<=len(S)<=10 and S.islower()==1 and S.isalpha()==1 \
           and 0<=P<=100 and isinstance(P,int)==1:
            args.append([S,P])
        else :
            print("ERROR")
            exit()

def sort_list(*args):
    tmp=sorted(args,key=itemgetter(1),reverse=1)
    dict_sorted=sorted(tmp,key=itemgetter(0))

    return dict_sorted


def check_list(seq):
    seen = []
    unique_list = [x for x in seq if x not in seen and not seen.append(x)]
    if len(seq) != len(unique_list):
        print("ERORR")
        exit()
    # else :                                                                                         
    #     print("restaurant is ok.") 
   
  
def main():
    # restaurant=[['N1',88],['N2',85],['N3',92],['N7',21],['N4',34],['N8',45],['N2',24],['N2',35]]   
    # num=8                                                                                          

    num=int(input())
    if 1<=num<=100:
        # [[] for i in range(5)]                                                                     
        restaurant=[]
        input_list(num,restaurant)

        check_list(restaurant)

        # print(restaurant)                                                                          
        restaurant_sorted=sort_list(*restaurant)

        for i in range(num):
            for j in range(num):
                if restaurant_sorted[i][1]==restaurant[j][1]:
                    print(j+1)
    else :
        print("ERORR")
        exit()

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import math
import sys
args = sys.argv
A = int(args[1])
P = int(args[2])

if 0<=A and P<=100 :
    Pi = math.floor((3*A +P)/2)
    print(Pi)
else :
    print("ERROR")

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

args = sys.argv
A = int(args[1])
P = int(args[2])

if 0<=A and P<=100 :
    Pi = math.floor((3*A +P)/2)
    print(Pi)
else :
    print("ERROR")

Buggy submission (verdict: Runtime Error):
import math
import sys
args = sys.argv
A = int(args[1])
P = int(args[2])
if 0<=A and P<=100 :
    Pi = math.floor((3*A +P)/2)
    print(Pi)

Buggy submission (verdict: Runtime Error):
#!/work/yota509/env_python3/bin/python3
# -*- coding: utf-8 -*-

#apple_pie
# りんごA個　かけらがP個。砕くことで1個が三個に。
# かけら２個を鍋で煮込んでアップルパイ1個
# 入力は整数
# 0<=A,P<=100
import argparse
import math
import sys
args = sys.argv
A = int(args[1])
P = int(args[2])

Pi = math.floor((3*A +P)/2)
print(Pi)