Buggy python 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()



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 python 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")

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 python 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")

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 python 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)

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 python 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)

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")