Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import itertools


def roll(dice, commands):
    for command in commands:
        if command == 'N':
            dice[0], dice[1], dice[5], dice[4] = dice[1], dice[5], dice[4], dice[0]
        elif command == 'W':
            dice[0], dice[3], dice[5], dice[2] = dice[2], dice[0], dice[3], dice[5]

A = list(map(int, input().split()))
B = list(map(int, input().split()))
for i in range(4):
    for j in range(4):
        for commands in itertools.permutations('N' * i + 'W' * j):
            a = A[::]
            roll(a, commands)
            if B == a:
                print('Yes')
                exit()
print('No')

Fixed submission:
class Dice(list):
    def __init__(self, *args):
        super().__init__(*args)

    def roll(self, command):
        if command == 'N':
            self[0], self[1], self[5], self[4] = self[1], self[5], self[4], self[0]
        elif command == 'S':
            self[0], self[1], self[5], self[4] = self[4], self[0], self[1], self[5]
        elif command == 'W':
            self[0], self[3], self[5], self[2] = self[2], self[0], self[3], self[5]
        elif command == 'E':
            self[0], self[3], self[5], self[2] = self[3], self[5], self[2], self[0]

    def spin(self, repeat=1):
        for _ in range(repeat):
            self[3], self[1], self[2], self[4] = self[1], self[2], self[4], self[3]

    def _fix_position(self):
        self._min_num_to_top()
        self._min_side_num_to_front()

    def _min_num_to_top(self):
        idx = self.index(min(self))
        if idx == 0:
            pass
        elif idx == 1:
            self.roll('N')
        elif idx == 2:
            self.roll('W')
        elif idx == 3:
            self.roll('E')
        elif idx == 4:
            self.roll('S')
        elif idx == 5:
            self.roll('N')
            self.roll('N')

    def _min_side_num_to_front(self):
        idx = self.index(min(self[3], self[1], self[2], self[4]))
        if idx == 1:
            pass
        elif idx == 2:
            self.spin(1)
        elif idx == 3:
            self.spin(3)
        elif idx == 4:
            self.spin(2)

    def __hash__(self):
        self._fix_position()
        return hash(tuple(self))

    def __eq__(self, other):
        return hash(self) == hash(other)


if __name__ == '__main__':
    n = int(input())
    dices = set(Dice(map(int, input().split())) for _ in range(n))
    print('Yes' if n == len(dices) else 'No')
Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
print('%.7f %.7f' % (r * r * math.pi, 2 * r * math.pi))

Fixed submission:
import math
r = float(input())
print('%.7f %.7f' % (r * r * math.pi, 2 * r * math.pi))
Buggy python submission (verdict: Runtime Error):
while 1:
    t = input()
    if t == '0 ? 0':
        break
    print(int(eval(t)))

Fixed submission:
while 1:
    t = input()
    if '?' in t:
        break
    print(int(eval(t)))

Buggy python submission (verdict: Runtime Error):
while 1:
    t = input()
    if t == '0 ? 0':
        break
    print(int(eval(t)))

Fixed submission:
while 1:
    t = input()
    if '?' in t:
        break
    print(int(eval(t)))
Buggy python submission (verdict: Runtime Error):
n = int(input())
L = map(int, input().split())
print(min(L), max(L), sum(L))

Fixed submission:
n = int(input())
L = list(map(int, input().split()))
print(min(L), max(L), sum(L))
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
def insertSort(array):
    for i in array[1:]:
        [print(array[i]) for i in array]
        v = array[i]
        j = i - 1
        while j >= 0 and array[j] > v:
            array[j+1] = array[j]
            j -= 1
        array[j+1] = v
        
if __name__ == '__main__':
    n = input()
    index = [int for i in input().split()]
    insertSort(index)

Fixed submission:
def insertSort(a, n):
    for i in range(1, n):
        v = a[i]
        j = i - 1
        while j >= 0 and a[j] > v:
            a[j+1] = a[j]
            j -= 1
        a[j+1] = v
        print(' '.join(map(str, a)))

if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    print(' '.join(map(str, a)))
    insertSort(a, n)
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
int main(void) {
	int x;
	
    scanf("%d", &x);
    printf("%d\n", x*x*x);

    return 0;

}

Fixed submission:
a, b = map(int, input().split())
sq = a * b
leng = a*2 + b*2
print('{} {}'.format(sq,leng))
Buggy python submission (verdict: Runtime Error):
n=int(input())
A=list(map(int,input().split()))

for i in range(1,n):
	print(" ".join(map(int,A)))
	j=i-1
	while A[j]<A[j-1] and j>0:
		(A[j],A[j-1])=(A[j-1],A[j])
		j=j-1
else:
	print(" ".join(map(int,A)))

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

for i in range(1,n):
	print(" ".join(map(str,A)))
	j=i
	while A[j]<A[j-1] and j>0:
		(A[j],A[j-1])=(A[j-1],A[j])
		j=j-1
else:
	print(" ".join(map(str,A)))
Buggy python submission (verdict: Time Limit Exceeded):
def prime(a):
	if a==1:
		return 0
	n=2
	while n<a:
		if a%n==0:
			return 0
		n+=1
	return 1

N=int(input())

count=0
for i in range(N):
	a=int(input())
	count+=prime(a)
print(count)

Fixed submission:
import math

def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1

N=int(input())

count=0
for i in range(N):
	a=int(input())
	count+=prime(a)
print(count)
Buggy python submission (verdict: Runtime Error):
x=input()
x=x**3
print(x)

Fixed submission:
x=int(input())
x=x**3
print(x)

Buggy python submission (verdict: Runtime Error):
x=int(input(x))
x=x**3
print(x)

Fixed submission:
x=int(input())
x=x**3
print(x)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
    if a>b:
    print("a > b")
elif a==b:
    print("a == b")
else:
    print("a < b")

Fixed submission:
a,b=map(int,input().split())
if a>b:
    print("a > b")
elif a==b:
    print("a == b")
else:
    print("a < b")
Buggy python submission (verdict: Runtime Error):
import sys
n=1

ff=map(input().split())
for i in ff:
	if i==0:
		break
	print("Case {0}: {1},".format(n,i))
	n=n+1

Fixed submission:
import sys
#a = open("test.txt", "r")
a = sys.stdin
 
count = 1
for line in a:
    if int(line) == 0:
    	break
    print("Case {0}: {1}".format(count, line), end="")
    count = count + 1

Buggy python submission (verdict: Runtime Error):
n=1

ff=map(input().splitlines())
for i in ff:
	if i==0:
		break
	print("Case {0}: {1},".format(n,i))
	n=n+1

Fixed submission:
import sys
#a = open("test.txt", "r")
a = sys.stdin
 
count = 1
for line in a:
    if int(line) == 0:
    	break
    print("Case {0}: {1}".format(count, line), end="")
    count = count + 1
Buggy python submission (verdict: Runtime Error):
import sys
print (int(sys.argv[1]) ** 3)

Fixed submission:
i = int(raw_input())
print(i ** 3)

Buggy python submission (verdict: Runtime Error):
import sys
print(int(sys.argv[1]) ** 3)

Fixed submission:
i = int(raw_input())
print(i ** 3)

Buggy python submission (verdict: Runtime Error):
import sys
print(sys.argv[1])

Fixed submission:
i = int(raw_input())
print(i ** 3)

Buggy python submission (verdict: Runtime Error):
import sys
t = sys.argv[1]

Fixed submission:
i = int(raw_input())
print(i ** 3)
Buggy python submission (verdict: Runtime Error):
list = []
while True:
  line = raw_input().split(" ")
  if line[0] == 0 and line[1] == 0:
    break
  line = map(int, line)
  #print line
  if line[0] > line[1]:
    temp = line[0]
    line[0] = line[1]
    line[1] = temp
  print " ".join(map(str, line))

Fixed submission:
list = []
while True:
  line = raw_input().split(" ")
  if line[0] == "0" and line[1] == "0":
    break
  line = map(int, line)
  #print line
  if line[0] > line[1]:
    temp = line[0]
    line[0] = line[1]
    line[1] = temp
  print " ".join(map(str, line))
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())

i = 0
s = []
h = []
c = []
d = []

def order_list(list):
  l = len(list)
  for i in xrange(l):
    j = i + 1
    while j < l:
      if list[i] > list[j]:
        temp = list[i]
        list[i] = list[j]
        list[j] = temp
      j += 1

  return list

def not_enough_cards(mark, list):
  list = order_list(list)
  i = 0
  for x in xrange(1, 14):
    if x != list[i]:
      print mark + " " + str(x)
    else:
      i += 1

while i < n:
  line = raw_input().split(" ")
  line[1] = int(line[1])
  if line[0] == "S":
    s.append(line[1])
  elif line[0] == "H":
    h.append(line[1])
  elif line[0] == "C":
    c.append(line[1])
  elif line[0] == "D":
    d.append(line[1])
  i += 1

not_enough_cards("S", s)
not_enough_cards("H", h)
not_enough_cards("C", c)
not_enough_cards("D", d)

Fixed submission:
n = int(raw_input())

i = 0
s = []
h = []
c = []
d = []

def order_list(list):
  l = len(list)
  for i in xrange(l):
    j = i + 1
    while j < l:
      if list[i] > list[j]:
        temp = list[i]
        list[i] = list[j]
        list[j] = temp
      j += 1

  return list

def not_enough_cards(mark, list):
  list = order_list(list)
  # line = "########################################"
  # print line
  # print mark + ":"
  # print list
  # print line
  i = 0
  for x in xrange(1, 14):
    # print "x = " + str(x) + ", i = " + str(i)
    if i >= len(list):
      print mark + " " + str(x)
    elif x != list[i]:
      print mark + " " + str(x)
    else:
      i += 1

while i < n:
  line = raw_input().split(" ")
  line[1] = int(line[1])
  if line[0] == "S":
    s.append(line[1])
  elif line[0] == "H":
    h.append(line[1])
  elif line[0] == "C":
    c.append(line[1])
  elif line[0] == "D":
    d.append(line[1])
  i += 1

not_enough_cards("S", s)
not_enough_cards("H", h)
not_enough_cards("C", c)
not_enough_cards("D", d)
Buggy python submission (verdict: Runtime Error):
num = raw_input()
num_list = raw_input()
num_list = num_list.split()
print "???".join(num_list)
 
for i in range(1, len(num_list)):
        temp = num_list[i]
        j = i - 1
        while (j >= 0 and num_list[j] > temp):
                num_list[j+1] = num_list[j]
                j -= 1
        num_list[j+1] = temp
        print "???".join(num_list)

Fixed submission:
num = raw_input()
num_list = raw_input()
num_list = num_list.split()
print " ".join(num_list)

 
for i in range(1, len(num_list)):
        num_list = map(int, num_list)
        temp = num_list[i]
        j = i - 1
        while (j >= 0 and num_list[j] > temp):
                num_list[j+1] = num_list[j]
                j -= 1
        num_list[j+1] = temp
        num_list = map(str, num_list)
        print " ".join(num_list)
Buggy python submission (verdict: Runtime Error):
num = raw_input()
num_list = []
for i in range(int(num)):
        a = raw_input()
        num_list.append(int(a))

minv = num_list[0]

for i in range(1, len(num_list)):
        maxv = max(maxv, num_list[i] - minv)
        minv = min(minv, num_list[i])

print maxv

Fixed submission:
num = raw_input()
num_list = []
for i in range(int(num)):
        a = raw_input()
        num_list.append(int(a))

maxv = float("-inf")
minv = num_list[0]

for i in range(1, len(num_list)):
        maxv = max(maxv, num_list[i] - minv)
        minv = min(minv, num_list[i])

print maxv
Buggy python submission (verdict: Runtime Error):
num = int(raw_input())
line = raw_input()

A_str = line.strip().split(" ")
print " ".join(A_str)
A = map(int, item_str)

for i in range(1, num):
    v = A[i]
    j = i - 1
    for j in range(j, -1, -1):
        if A[j] > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = v
    A_str = map(str, A)
    print " ".join(A_str)

Fixed submission:
num = int(raw_input())
line = raw_input()

A = line.strip().split(" ")
print " ".join(A)
#A = map(int, item_str)

for i in range(1, num):
    v = int(A[i])
    j = i - 1
    for j in range(j, -1, -1):
        if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = str(v)
    #A_str = map(str, A)
    print " ".join(A)

Buggy python submission (verdict: Runtime Error):
num = int(raw_input())
line = raw_input()

A_str = line.strip().split(" ")
print " ".join(A_str)
A = map(int, item_str)

for i in range(1, num):
    v = A[i]
    j = i - 1
    for j in range(j, -1, -1):
        if A[j] > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = v
    A_str = map(str, A)
    print " ".join(A_str)

Fixed submission:
num = int(raw_input())
line = raw_input()

A = line.strip().split(" ")
print " ".join(A)
#A = map(int, item_str)

for i in range(1, num):
    v = int(A[i])
    j = i - 1
    for j in range(j, -1, -1):
        if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = str(v)
    #A_str = map(str, A)
    print " ".join(A)
Buggy python submission (verdict: Runtime Error):
import sys
my_list = []
max_list = []
len_line = int(sys.stdin.readline().strip())

for item in sys.stdin.readlines()[:-1]:
    my_list.append(int(item.strip()))

for i in range(1, len_line):
    max_list.append(my_list[i] - min(my_list[:i]))

print max(max_list)

Fixed submission:
num = raw_input()
num_list = []
for i in range(int(num)):
    a = raw_input()
    num_list.append(int(a))

min_ans = num_list[0]
max_ans = float("-inf")
for i in num_list[1:]:
    if i - min_ans > max_ans:
        max_ans = i - min_ans
    if i < min_ans:
        min_ans = i

print max_ans

Buggy python submission (verdict: Runtime Error):
import sys
my_list = []
max_list = []
len_line = int(sys.stdin.readline().strip())

for item in sys.stdin.read()[:-1]:
    my_list.append(int(item.strip()))

for i in range(1, len_line):
    max_list.append(my_list[i] - min(my_list[:i]))

print max(max_list)

Fixed submission:
num = raw_input()
num_list = []
for i in range(int(num)):
    a = raw_input()
    num_list.append(int(a))

min_ans = num_list[0]
max_ans = float("-inf")
for i in num_list[1:]:
    if i - min_ans > max_ans:
        max_ans = i - min_ans
    if i < min_ans:
        min_ans = i

print max_ans

Buggy python submission (verdict: Runtime Error):
num = raw_input()

for i in range(int(num)):
    a = raw_input()
    num_list.append(int(a))

min_ans = num_list[0]
max_ans = float("-inf")
for item in num_list[1:]:
    if i - min_ans > max_ans:
        max_ans = i - min_ans
    if i < min_ans:
        min_ans = i

print max_ans

Fixed submission:
num = raw_input()
num_list = []
for i in range(int(num)):
    a = raw_input()
    num_list.append(int(a))

min_ans = num_list[0]
max_ans = float("-inf")
for i in num_list[1:]:
    if i - min_ans > max_ans:
        max_ans = i - min_ans
    if i < min_ans:
        min_ans = i

print max_ans
Buggy python submission (verdict: Runtime Error):
num = int(raw_input())
line = raw_input()

A_str = line.strip().split(" ")
print " ".join(A_str)
A = map(int, item_str)

for i in range(1, num):
    v = A[i]
    j = i - 1
    for j in range(j, -1, -1):
        if A[j] > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = v
    A_str = map(str, A)
    print " ".join(A_str)

Fixed submission:
N = int(raw_input())
A = map(int, raw_input().split())
count = 0
flag = True
while flag:
    flag = False
    for j in range(N-1, 0, -1):
        if A[j] < A[j-1]:
            A_j = A[j]
            A[j] = A[j-1]
            A[j-1] = A_j
            flag = True
            count += 1
print " ".join(map(str, A))
print count
Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
A = []
B = []

def insert(B, x):
    B.insert(0, x)
    return B
def delete(B, x):
    i = 0
    for num in B:
        if num == x:
            B.pop(i)
            break
        i += 1
    return B
def deleteFirst(B):
    B.pop(0)
    return B
def deleteLast(B):
    B.pop()
    return B
operation = {'insert':insert, 'delete':delete, 'deleteFirst':deleteFirst, 'deleteLast':deleteLast}

for i in range(N):
    a = raw_input().split()
    if len(a) == 2:
        A.append([a[0], int(a[1])])
    else:
        A.append([a[0]])


for item in A:
    if len(item) == 2:
        command, num = item
        B = operation[command](B, num)
    else:
        command = item[0]
        B = operation[command](B)

print B

Fixed submission:
N_str, q_str = raw_input().split()
N = int(N_str)
q = int(q_str)

A = []
B = []

for i in range(N):
    a = raw_input().split()
    A.append([a[0], int(a[1])])

total_time = 0
while A:
    name, time = A.pop(0)
    if time <= q:
        total_time += time 
        B.append("%s %d" % (name, total_time))
    else:
        time -= q
        A.append([name, time])
        total_time += q
print '\n'.join(B)
Buggy python submission (verdict: Runtime Error):
n = raw_input()
num = raw_input()
array = []
array = num.strip().split(" ")

for i in range(1, int(n)):
    print " ".join(array)
    v = array[i]
    j = i - 1
    while j >= 0 and array[j] > v:
        array[j + 1] = array[j]
        j -= 1
    array[j + 1] = v
print " ".join(array

Fixed submission:

n = raw_input()
num = raw_input()
array = []
array = num.strip().split(" ")
int_array = map(int, array)

for i in range(1, int(n)):
    array = map(str, int_array)
    print " ".join(array)
    v = int_array[i]
    j = i - 1
    while j >= 0 and int_array[j] > v:
        int_array[j + 1] = int_array[j]
        j -= 1
    int_array[j + 1] = v
array = map(str, int_array)
print " ".join(array)
Buggy python submission (verdict: Runtime Error):
numbers = []
n = raw_input()
for i in range(int(n)):
    input_num = raw_input()
    numbers.append(int(input_num))
count = 0
for num in numbers:
    if num == 2:
        count += 1
    for i in range(2, int(math.sqrt(num)) + 1):
        if num % i == 0:
            break
        count += 1
print count

Fixed submission:
import math

numbers = []
n = raw_input()
for i in range(int(n)):
    input_num = raw_input()
    numbers.append(int(input_num))

count = 0
for num in numbers:
    prime_frag = True
    for i in range(2, int(math.sqrt(num)) + 1):
        if num % i == 0:
            prime_frag = False
            break
    if prime_frag:
        count += 1
print count

Buggy python submission (verdict: Runtime Error):
numbers = []
n = raw_input()
for i in range(int(n)):
    input_num = raw_input()
    numbers.append(int(input_num))
count = 0
for num in numbers:
    if num == 2:
        count += 1
    for i in range(2, int(math.sqrt(num)) + 1):
        if num % i == 0:
            break
        count += 1
print count

Fixed submission:
import math

numbers = []
n = raw_input()
for i in range(int(n)):
    input_num = raw_input()
    numbers.append(int(input_num))

count = 0
for num in numbers:
    prime_frag = True
    for i in range(2, int(math.sqrt(num)) + 1):
        if num % i == 0:
            prime_frag = False
            break
    if prime_frag:
        count += 1
print count
Buggy python submission (verdict: Runtime Error):
global count
acount = 0


def merge(num_list, left, mid, right):
    a = mid - left
    b = right - mid
    L = []
    R = []

    for i in range(a):
        L.append(num_list[left + i])
    for i in range(b):
        R.append(num_list[mid + i])

    L.append(float("inf"))
    R.append(float("inf"))

    i = 0
    j = 0
    global count

    for k in range(left, right):
        if L[i] <= R[j]:
            num_list[k] = L[i]
            i += 1
        else:
            num_list[k] = R[j]
            j += 1
        count += 1


def mergeSort(num_list, left, right):
    if left+1 < right:
        mid = (left + right) / 2
        mergeSort(num_list, left, mid)
        mergeSort(num_list, mid, right)
        merge(num_list, left, mid, right)

    return num_list


if __name__ == "__main__":
    num = raw_input()
    line = raw_input()

    num_list = line.strip().split()
    num_list = map(int, num_list)

    merge_list = mergeSort(num_list, 0, len(num_list))
    merge_list = map(str, merge_list)
    print " ".join(merge_list)
    print count

Fixed submission:
global count
count = 0


def merge(num_list, left, mid, right):
    a = mid - left
    b = right - mid
    L = []
    R = []

    for i in range(a):
        L.append(num_list[left + i])
    for i in range(b):
        R.append(num_list[mid + i])

    L.append(float("inf"))
    R.append(float("inf"))

    i = 0
    j = 0
    global count

    for k in range(left, right):
        if L[i] <= R[j]:
            num_list[k] = L[i]
            i += 1
        else:
            num_list[k] = R[j]
            j += 1
        count += 1


def mergeSort(num_list, left, right):
    if left+1 < right:
        mid = (left + right) / 2
        mergeSort(num_list, left, mid)
        mergeSort(num_list, mid, right)
        merge(num_list, left, mid, right)

    return num_list


if __name__ == "__main__":
    num = raw_input()
    line = raw_input()

    num_list = line.strip().split()
    num_list = map(int, num_list)

    merge_list = mergeSort(num_list, 0, len(num_list))
    merge_list = map(str, merge_list)
    print " ".join(merge_list)
    print count
Buggy python submission (verdict: Runtime Error):
import sys

x = []

max = -10**9

for line in sys.stdin.readline()
  x.append(line)

length = int(x[0])

x.remove(x[0])

for i in range(0, length):
  for j in range(i + 1, length):
    sa = int(x[j]) - int(x[i])
    if max < sa:
      max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = int(x[1])

for i in range(2, int(x[0])+1):
  sa = int(x[i]) - min
  if max < sa:
    max = sa
  if min > int(x[i]):
    min = int(x[i])

  

print max

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

x = []

max = -10**9

for line in sys.stdin.readlines()
  x.append(line.strip())

length = int(x[0])

x.remove(x[0])

for i in range(0, length):
  for j in range(i + 1, length):
    sa = int(x[j]) - int(x[i])
    if max < sa:
      max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = int(x[1])

for i in range(2, int(x[0])+1):
  sa = int(x[i]) - min
  if max < sa:
    max = sa
  if min > int(x[i]):
    min = int(x[i])

  

print max

Buggy python submission (verdict: Time Limit Exceeded):
import sys

x = []

max = -(10**9)

for line in sys.stdin.readlines():
  x.append(line.strip())

length = int(x[0])

x.remove(x[0])

for i in range(0, length):
  for j in range(i + 1, length):
    sa = int(x[j]) - int(x[i])
    if max < sa:
      max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = int(x[1])

for i in range(2, int(x[0])+1):
  sa = int(x[i]) - min
  if max < sa:
    max = sa
  if min > int(x[i]):
    min = int(x[i])

  

print max

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

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = x[1]

for i in range(2, x[0]):
  sa = x[i] - min
  if max < sa:
    max = sa
  if min > x[i]:
    min = x[i]

  

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = int(x[1])

for i in range(2, int(x[0])+1):
  sa = int(x[i]) - min
  if max < sa:
    max = sa
  if min > int(x[i]):
    min = int(x[i])

  

print max

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

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = int(x[1])

for i in range(2, int(x[0]+1)):
  sa = int(x[i]) - min
  if max < sa:
    max = sa
  if min > int(x[i]):
    min = int(x[i])

  

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
  x.append(line.strip())

max = -(10**9)
min = int(x[1])

for i in range(2, int(x[0])+1):
  sa = int(x[i]) - min
  if max < sa:
    max = sa
  if min > int(x[i]):
    min = int(x[i])

  

print max
Buggy python submission (verdict: Runtime Error):
import sys

x = sys.argy[1]

x3 = x * x * x

print x3

Fixed submission:
import sys

x = sys.stdin.readline()

x3 = int(x) * int(x) * int(x)

print x3

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

x = sys.argv[1]

x3 = int(x) * int(x) * int(x)

print x3

Fixed submission:
import sys

x = sys.stdin.readline()

x3 = int(x) * int(x) * int(x)

print x3