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

Taro = 0
Hanako = 0

n = int(input())

for i in range(n):
    T,H = map(str, input().split())
    if T > H:
        T += 3
    elif T = H:
        T += 1
        H += 1
    else:
        H += 3

print(Taro, Hanako)



Fixed submission:

Taro = 0
Hanako = 0

n = int(input())

for i in range(n):
    T,H = map(str, input().split())
    if T > H:
        Taro += 3
    elif T == H:
        Taro += 1
        Hanako += 1
    else:
        Hanako += 3

print(Taro, Hanako)

Buggy python submission (verdict: Runtime Error):

Taro = 0
Hanako = 0

n = int(input())

for i in range(n):
    T,H = map(str, input().split())
    if T > H:
        Taro += 3
    elif T = H:
        Taro += 1
        Hanako += 1
    else:
        Hanako += 3

print(Taro, Hanako)



Fixed submission:

Taro = 0
Hanako = 0

n = int(input())

for i in range(n):
    T,H = map(str, input().split())
    if T > H:
        Taro += 3
    elif T == H:
        Taro += 1
        Hanako += 1
    else:
        Hanako += 3

print(Taro, Hanako)
Buggy python submission (verdict: Runtime Error):
import sys

def print_arr(arr):
	for i in range(len(arr)):
		sys.stdout.write(str(arr[i]))
		if i != len(arr) - 1:
			sys.stdout.write(' ')
	print()

def insertion_sort(arr, n, g):
	cnt = 0
	for i in range(g, n):
		v = arr[i]
		j = i - g
		while j >= 0 and arr[j] > v:
			arr[j + g] = arr[j]
			j = j - g
			cnt += 1
		arr[j + g] = v
	return cnt

def shell_sort(arr, g):
	cnt = 0
	for i in range(len(g)):
		cnt += insertion_sort(arr, len(arr), g[i])
	return cnt

def get_gap(n):
	lst = []
	v = 1
	while v <= n:
		lst.append(v)
		v += 3**cnt
	if len(lst) == 0: lst.append(1)
	return list(reversed(lst))

n = int(input())
arr = [0] * n
for i in range(n):
	arr[i] = int(input())

g = get_gap(n)
m = len(g)
cnt = shell_sort(arr, g)

print(m)
print_arr(g)
print(cnt)
for i in range(n):
	print(arr[i])



Fixed submission:
import sys

def print_arr(arr):
	for i in range(len(arr)):
		sys.stdout.write(str(arr[i]))
		if i != len(arr) - 1:
			sys.stdout.write(' ')
	print()

def insertion_sort(arr, g):
	n = len(arr)
	cnt = 0
	for i in range(n):
		key = arr[i]
		j = i - g
		while j >= 0 and arr[j] > key:
			arr[j + g] = arr[j]
			j -= g
			cnt += 1
		arr[j + g] = key
	return cnt

def shell_sort(arr, G):
	cnt = 0
	for i in range(len(G)):
		cnt += insertion_sort(arr, G[i])
	return cnt

def get_gaps(n):
	lst = []
	v = 1
	cnt = 1
	while v <= n:
		lst.append(v)
		v += 3**cnt
		cnt += 1
	if len(lst) == 0: lst.append(1)
	return list(reversed(lst))

n = int(input())
arr = [None] * n
for i in range(n):
	arr[i] = int(input())

G = get_gaps(n)
cnt = shell_sort(arr, G)

print(len(G))
print_arr(G)
print(cnt)
for i in range(n):
	print(arr[i])
Buggy python submission (verdict: Time Limit Exceeded):

count = 0

def merge_sort(arr):
	merge_sort_(arr, 0, len(arr) - 1)

def merge_sort_(arr, floor, ceiling):
	if floor < ceiling:
		mid = int(floor + (ceiling - floor) / 2)
		merge_sort_(arr, floor, mid)
		merge_sort_(arr, mid + 1, ceiling)
		merge(arr, floor, mid, ceiling)

def merge(arr, floor, mid, ceiling):
	global count
	temp_arr = [0] * len(arr)
	for i in range(floor, ceiling + 1):
		temp_arr[i] = arr[i]
	
	i = floor
	j = mid + 1
	k = floor
	while k <= ceiling:
		count += 1
		if j > ceiling or (i <= mid and temp_arr[i] <= temp_arr[j]):
			arr[k] = temp_arr[i]
			i += 1
		else:
			arr[k] = temp_arr[j]
			j += 1
		k += 1
		
n = int(input())
arr = list(map(int, input().split()))
merge_sort(arr)
for i in range(n):
	print(arr[i], end="")
	if i != n - 1:
		print(" ", end="")
print()
print(count)




Fixed submission:
import sys
count = 0

def merge_sort(arr):
	merge_sort_(arr, 0, len(arr))

def merge_sort_(arr, left, right):
	if left + 1 < right:
		mid = int(left + (right - left) / 2)
		merge_sort_(arr, left, mid)
		merge_sort_(arr, mid, right)
		merge(arr, left, mid, right)

def merge(arr, left, mid, right):
	global count
	
	n1 = mid - left
	n2 = right - mid
	
#	L = [0] * (n1 + 1)
#	R = [0] * (n2 + 1)
#	for i in range(n1):
#		L[i] = arr[left + i]
#	for i in range(n2):3
#		R[i] = arr[mid + i]
#	L[n1] = R[n2] = sys.maxsize
	
	L = arr[left:left + n1]
	R = arr[mid:mid + n2]
	L.append(sys.maxsize)
	R.append(sys.maxsize)

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

n = int(input())
arr = list(map(int, input().split()))
merge_sort(arr)
print(" ".join(map(str, arr)))
#for i in range(n):
#	print(arr[i], end="")
#	if i != n - 1:
#		print(" ", end="")
#print()
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
cnt2 = 0

def bubble_sort(a):
	cnt = 0
	n = len(a)
	for i in range(n):
		for j in range(n-1, i, -1):
			if a[j] < a[j-1]:
				tmp = a[j]
				a[j] = a[j-1]
				a[j-1] = tmp
				cnt += 1
	return cnt

def merge_sort(a):
	merge_sort_(a, 0, len(a))

def merge_sort_(a, left, right):
	if left + 1 < right:
		mid = int(left + (right - left) / 2)
		merge_sort_(a, left, mid)
		merge_sort_(a, mid, right)
		merge(a, left, mid, right)

def merge(a, left, mid, right):
	n1 = mid - left
	n2 = right - mid
	L = a[left:left+n1]
	R = a[mid:mid+n2]
	L.append(sys.maxsize)
	R.append(sys.maxsize)
	i = j = 0
	for k in range(left, right):
		if L[i] <= R[j]:
#			a[k] = L[i]
			i += 1
		else:
			if L[i] != sys.maxsize:
				global cnt2
				cnt2 += 1
#			a[k] = R[j]
			j += 1

def inversion(a):
	cnt = 0
	for i in range(n):
		for j in range(i+1, n):
			if a[i] > a[j]:
				cnt += 1
	return cnt
	
n = int(input())
a1 = list(map(int, input().split()))
a2 = [0] * n
for i in range(n):
	a2[i] = a1[i]

#cnt1 = bubble_sort(a1)
#print(a1)
#print(cnt1)
cnt2 = inversion(a2)
#print(a2)
print(cnt2)



Fixed submission:
import sys
cnt = 0

def merge_sort(a, left, right):
	if left + 1 < right:
		mid = int(left + (right - left) / 2)
		merge_sort(a, left, mid)
		merge_sort(a, mid, right)
		merge(a, left, mid, right)

def merge(a, left, mid, right):
	n1 = mid - left
	n2 = right - mid
	L = a[left:left+n1]
	R = a[mid:mid+n2]
	L.append(sys.maxsize)
	R.append(sys.maxsize)
	i = j = 0
	for k in range(left, right):
		if L[i] <= R[j]:
			a[k] = L[i]
			i += 1
		else:
			if i < n1:
				global cnt
				cnt += n1 - i
			a[k] = R[j]
			j += 1
	
n = int(input())
a = list(map(int, input().split()))
merge_sort(a, 0, len(a))
print(cnt)
Buggy python submission (verdict: Runtime Error):
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(reader.readLine());
		String[] strArray = reader.readLine().split(" ");
		int[] a = new int[n];
		int[] c = new int[10000];
		int k = Integer.MIN_VALUE;
		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(strArray[i]);
			k = Math.max(k, a[i]);
			c[a[i]]++;
		}
		int[] b = new int[n];
		countingSort(a, b, c, k);
		System.out.print(b[0]);
		for (int i = 1; i < n; i++) {
			System.out.print(" " + b[i]);
		}
		System.out.println("");
	}

	private static void countingSort(int[] a, int[] b, int[] c, int k) {
		for (int i = 1; i <= k; i++) {
			c[i] = c[i] + c[i - 1];
		}
		for (int i = a.length - 1; i >= 0; i--) {
			b[c[a[i]] - 1] = a[i];
			c[a[i]]--;
		}
	}
}



Fixed submission:
n=int(input())
A=[0]*(n+1)
B=[0]*(n+1)
i=0
mx=(1<<30)*-1
for v in list(map(int,input().split())):
	A[i+1] = v
	mx=max(mx,A[i+1])
	i+=1	

C=[0]*(mx+1)
for i in range(n):
	C[A[i+1]]+=1
for i in range(1,mx+1):
	C[i] += C[i-1]
for i in range(n,0,-1):
	B[C[A[i]]] = A[i]
	C[A[i]]-=1

st=str(B[1])
for i in range(2,n+1):
	st += ' ' + str(B[i])
print(st)

Buggy python submission (verdict: Time Limit Exceeded):
def counting_sort(a, b, c, k):
	for i in range(1, k+1):
		c[i] = c[i] + c[i - 1]

	for i in range(len(a) - 1, -1, -1):
		num = a[i]
		b[c[num] - 1] = num
		c[num] -= 1

n = int(input())
a = list(map(int, input().split()))
b = [0] * n
c = [0] * 10000
k = 0
for i in range(n):
	num = a[i]
	k = max(k, num)
	c[num] += 1

counting_sort(a, b, c, k)
print(b[0], end='')
for i in range(1, n):
	print(' ' +  str(b[i]), end='')
print()



Fixed submission:
n=int(input())
A=[0]*(n+1)
B=[0]*(n+1)
i=0
mx=(1<<30)*-1
for v in list(map(int,input().split())):
	A[i+1] = v
	mx=max(mx,A[i+1])
	i+=1	

C=[0]*(mx+1)
for i in range(n):
	C[A[i+1]]+=1
for i in range(1,mx+1):
	C[i] += C[i-1]
for i in range(n,0,-1):
	B[C[A[i]]] = A[i]
	C[A[i]]-=1

st=str(B[1])
for i in range(2,n+1):
	st += ' ' + str(B[i])
print(st)

Buggy python submission (verdict: Time Limit Exceeded):

def counting_sort(a, b, c, k):
	for i in range(1, k + 1):
		c[i] += c[i - 1]
	for i in range(len(a) - 1, -1, -1):
		c[a[i]] -= 1
		b[c[a[i]]] = a[i]
		
n = int(input())
a = list(map(int, input().split()))
b = [0] * n
c = [0] * 10000
k = 0
for i in range(n):
	c[a[i]] += 1
	k = max(k, a[i])

counting_sort(a, b, c, k)
print(b[0], end='')
for i in range(1, n):
	print(' ' + str(b[i]), end='')
print()



Fixed submission:
n=int(input())
A=[0]*(n+1)
B=[0]*(n+1)
i=0
mx=(1<<30)*-1
for v in list(map(int,input().split())):
	A[i+1] = v
	mx=max(mx,A[i+1])
	i+=1	

C=[0]*(mx+1)
for i in range(n):
	C[A[i+1]]+=1
for i in range(1,mx+1):
	C[i] += C[i-1]
for i in range(n,0,-1):
	B[C[A[i]]] = A[i]
	C[A[i]]-=1

st=str(B[1])
for i in range(2,n+1):
	st += ' ' + str(B[i])
print(st)
Buggy python submission (verdict: Runtime Error):

class Dice:
	
	def __init__(self, faces):
		self.t = faces[0]
		self.s = faces[1]
		self.e = faces[2]
		self.w = faces[3]
		self.n = faces[4]
		self.b = faces[5]

	def roll(self, drct):
		t_ = self.t
		s_ = self.s
		e_ = self.e
		w_ = self.w
		n_ = self.n
		b_ = self.b
		if drct == 'S':
			self.t = 	def set_top(self, face):
		if self.t == face:
			return
		elif self.s == face:
			self.roll('N')
		elif self.e == face:
			self.roll('W')
		elif self.w == face:
			self.roll('E')
		elif self.n == face:
			self.roll('S')
		else
			self.roll('N')
			self.roll('N')_
			self.s = t_
			self.n = b_
			self.b = s_
		elif drct == 'N':
			self.t = s_
			self.s = b_
			self.n = t_
			self.b = n_
		elif drct == 'E':
			self.t = w_
			self.e = t_
			self.w = b_
			self.b = e_
		elif drct == 'W':
			self.t = e_
			self.e = b_
			self.w = t_
			self.b = w_
		else:
			return
	
	def set_top(self, face):
		if self.t == face:
			return
		elif self.s == face:
			self.roll('N')
		elif self.e == face:
			self.roll('W')
		elif self.w == face:
			self.roll('E')
		elif self.n == face:
			self.roll('S')
		else:
			self.roll('N')
			self.roll('N')
			
	def get_right_face(self, f):
		if self.s == f:
			return self.e
		elif self.e == f:
			return self.n
		elif self.w == f:
			return self.s
		else:
			return self.w
	
faces = list(map(int, input().split()))
dice = Dice(faces)

n = int(input())
for i in range(n):
	t, f = map(int, input().split())
	dice.set_top(t)
	print(dice.get_right_face(f))



Fixed submission:

class Dice:
	
	def __init__(self, faces):
		self.t = faces[0]
		self.s = faces[1]
		self.e = faces[2]
		self.w = faces[3]
		self.n = faces[4]
		self.b = faces[5]

	def roll(self, drct):
		t_ = self.t
		s_ = self.s
		e_ = self.e
		w_ = self.w
		n_ = self.n
		b_ = self.b
		if drct == 'S':
			self.t = n_
			self.s = t_
			self.n = b_
			self.b = s_
		elif drct == 'N':
			self.t = s_
			self.s = b_
			self.n = t_
			self.b = n_
		elif drct == 'E':
			self.t = w_
			self.e = t_
			self.w = b_
			self.b = e_
		elif drct == 'W':
			self.t = e_
			self.e = b_
			self.w = t_
			self.b = w_
		else:
			return
	
	def set_top(self, face):
		if self.t == face:
			return
		elif self.s == face:
			self.roll('N')
		elif self.e == face:
			self.roll('W')
		elif self.w == face:
			self.roll('E')
		elif self.n == face:
			self.roll('S')
		else:
			self.roll('N')
			self.roll('N')
			
	def get_right_face(self, f):
		if self.s == f:
			return self.e
		elif self.e == f:
			return self.n
		elif self.w == f:
			return self.s
		else:
			return self.w
	
faces = list(map(int, input().split()))
dice = Dice(faces)

n = int(input())
for i in range(n):
	t, f = map(int, input().split())
	dice.set_top(t)
	print(dice.get_right_face(f))
Buggy python submission (verdict: Runtime Error):
counts = [0] * 26

while True:
	s = str(input())
	if s == '': break
	
	for c in s:
		o = ord(c)
		if o >= 65 and o <= 90:
			counts[o - 65] += 1
		elif o >= 97 and o <= 122:
			counts[o - 97] += 1
	
for i in range(len(counts)):
	print(chr(i + 97) + ' : ' + str(counts[i]))



Fixed submission:
import sys
counts = [0] * 26

s = sys.stdin.read()
	
for c in s:
	o = ord(c)
	if o >= 65 and o <= 90:
		counts[o - 65] += 1
	elif o >= 97 and o <= 122:
		counts[o - 97] += 1
	
for i in range(len(counts)):
	print(chr(i + 97) + ' : ' + str(counts[i]))
Buggy python submission (verdict: Runtime Error):
a,b = [int(i) for i input().split()]
print(a*b , (a+b)*2)


Fixed submission:
a,b = [int(i) for i in input().split()]
print(a*b,2*(a+b))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = [int(input()) for x in range(N)]

cnt = 0
for i in range(N) :
    cnt += 1
    if a[i] == 2 :
        continue
    else :
        for j in range(2, a[i]) :
            if a[i] % j == 0:
                cnt -= 1
                break
            
print(cnt)


Fixed submission:
N = int(input())
a = [int(input()) for x in range(N)]

import math

cnt = 0
for i in range(N) :
    cnt += 1
    if a[i] == 2 :
        continue
    else :
        for j in range(2, int(math.sqrt(a[i])) + 1) :
            if a[i] % 2 == 0 :
                cnt -= 1
                break
            if a[i] % j == 0 :
                cnt -= 1
                break
            
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
r = [int(input()) for x in range(N)]

max_diff = min(r) - max(r) - 1

for i in range(N) :
    for j in range(i + 1, N) :
        max_diff = max(max_diff, r[j] - r[i])
        
print(max_diff)


Fixed submission:
n = int(input())

# initial observation
cur_min = int(input())
max_diff = -1 * (10**9) - 1

for i in range(n - 1) :
    num = int(input())
    
    max_diff = max(max_diff, num - cur_min)
    
    if num < cur_min :
        cur_min = num
    
print(max_diff)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
r = [int(input()) for x in range(N)]

cur_min = max(r) + 1
max_diff = min(r) - max(r) - 1
search_from_idx = 1

for i in range(N) :
    if r[i] >= cur_min :
        continue
        
    if search_from_idx <= i :
        search_from_idx = i + 1
        
    for j in range(search_from_idx, N) :
        if max_diff < r[j] - r[i] :
            max_diff = r[j] - r[i]
            search_from_idx = j

    cur_min = min(r[i], cur_min)
        
print(max_diff)


Fixed submission:
n = int(input())

# initial observation
cur_min = int(input())
max_diff = -1 * (10**9) - 1

for i in range(n - 1) :
    num = int(input())
    
    max_diff = max(max_diff, num - cur_min)
    
    if num < cur_min :
        cur_min = num
    
print(max_diff)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
r = [int(input()) for x in range(n)]

cur_max_diff = min(r) - max(r)
cur_min_idx = -1

for i in range(n) :
    
    if i == 0 :
        for j in range(1, n) :
            if r[j] - r[i] > cur_max_diff :
                cur_max_diff = r[j] - r[i]
                cur_min_idx = j
                
    elif i >= cur_min_idx :
        for j in range(i + 1, n) :
            if r[j] - r[i] > cur_max_diff :
                cur_max_diff = r[j] - r[i]
                cur_min_idx = j
    else :
        cur_max_diff = max(cur_max_diff, r[cur_min_idx] - r[i])
        
print(cur_max_diff)
        


Fixed submission:
n = int(input())

# initial observation
cur_min = int(input())
max_diff = -1 * (10**9) - 1

for i in range(n - 1) :
    num = int(input())
    
    max_diff = max(max_diff, num - cur_min)
    
    if num < cur_min :
        cur_min = num
    
print(max_diff)
Buggy python submission (verdict: Runtime Error):
n, q = map(int, input().split())

answer = []
# create segtree
size = 1

while size < n :
    size *= 2
    
size = size * 2 - 1
segtree = [0 for x in range(size)]

# update query
def update(i, x) :
    ind = size // 2 + i
    segtree[ind] += x
    
    while ind :
        ind = (ind - 1) // 2 # parent
        ch1 = segtree[ind * 2 + 1]
        ch2 = segtree[ind * 2 + 2]
        segtree[ind] = ch1 + ch2
    
def query(s, t, l, r, p) :
    if s > r or t < l :
        return 0
    if s <= l and t >= r :
        return segtree[p]
    else :
        vl = query(s, t, l, (l + r) // 2, p * 2 + 1)
        vr = query(s, t, (l + r) // 2 + 1, r, p * 2 + 2)
        
        return vl + vr
    
for i in range(q) :
    # print("DBG : ", segtree)
    com, x, y = map(int, input().split())
     
    if com == 0 :
        update(x, y)
    else :
        answer.append(query(x, y, 0, size // 2, 0))

for a in answer :
    print(a)
    



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

# max_num
DEF = 0

# generate seg tree
seg_size = 2

while seg_size < n :
    seg_size *= 2
    
seg_size = seg_size * 2 - 1
seg_tree = [DEF for x in range(seg_size)]

answer_stk = []

# update 
def update(i, x) :
    # leaf for index @ i
    idx = seg_size // 2 + i
    seg_tree[idx] += x
    
    while idx :
        idx = (idx - 1) // 2
        l_child = seg_tree[idx * 2 + 1]
        r_child = seg_tree[idx * 2 + 2]
        
        seg_tree[idx] = l_child + r_child

# query
def query(s, t, l, r, curnode) :
    # no overlap then return INF
    if s > r or t < l :
        return DEF
    
    # full overlap then return current node
    if s <= l and t >= r :
        return seg_tree[curnode]
    
    # partial overlap then return min for next
    else :
        l_child = curnode * 2 + 1
        r_child = curnode * 2 + 2
        
        l_value = query(s, t, l, (l + r) // 2, l_child)
        r_value = query(s, t, (l + r) // 2 + 1, r, r_child)
        
        return l_value + r_value
    
# do main query
for i in range(q) :
    q, x, y = map(int, input().split())
    
    # update
    if q == 0 :
        update(x - 1, y)
        
    # query 
    else :
        answer_stk.append(query(x - 1, y - 1, 0, seg_size // 2, 0))
        
for a in answer_stk :
    print(a)
Buggy python submission (verdict: Runtime Error):
<?php
$hi = fopen('php://stdin', "r");
$ho = fopen('php://stdout', "w");

# 空の配列を作成
$arr = array();

# 標準入力からデータをセット
for($i = 0; $i < 10; $i++)
{
	fscanf($hi, "%d", $arr[]);
}

# 降順ソート
rsort($arr);

# 出力
for($i = 0; $i < 3; $i++)
{
	fwrite($ho, sprintf("%d\n", $arr[$i]));
}

fclose($ho);
fclose($hi);

Fixed submission:
n = list()

for var in range(0, 10):
  n.append( int(raw_input()) )
  
n.sort(reverse = True)
  
for var in range(0, 3):
  print n[var]
Buggy python submission (verdict: Runtime Error):
def main():
    while True:
        n=int(raw_input())
        if n==0:    break;
        solve(n)
def solve(n):
    a=[]
    for _ in range(n):
        tmp=map(int,raw_input().split(" "))
        a.append(Pair(tmp[0],tmp[1]+tmp[2]))
    a.sort()
    print a[-1].x, a[-1].y
class Pair:
    def __init__(self,x,y):
        self.x=x
        self.y=y
    def __cmp__(self,a):
        return self.y-a.y
if __name__=="__main__":    main()

Fixed submission:
import sys
def main():
    while True:
        ipt=raw_input()
        if str.isdigit(ipt):
            n=int(ipt)
            if n==0:    break;
            solve(n)
        else:
            sys.stderr.write(ipt)
def solve(n):
    a=[]
    for _ in range(n):
        tmp=map(int,raw_input().split(" "))
        a.append(Pair(tmp[0],tmp[1]+tmp[2]))
    a.sort()
    print a[-1].x, a[-1].y
class Pair:
    def __init__(self,x,y):
        self.x=x
        self.y=y
    def __cmp__(self,a):
        return self.y-a.y
if __name__=="__main__":    main()
Buggy python submission (verdict: Runtime Error):
v = 0
read(v)
print(v ** 3)

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

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

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

Buggy python submission (verdict: Runtime Error):
v=input()
v=int(v)
print(v**i)
print('\n')

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

Buggy python submission (verdict: Runtime Error):
v=input()
v=int(v)
print(v**i '\n')

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

Buggy python submission (verdict: Runtime Error):
v=input()
v=int(v)
print(v**i)

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

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

print x ** 3

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

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

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

Buggy python submission (verdict: Runtime Error):
x**3

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

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

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

Buggy python submission (verdict: Runtime Error):
a=input()
print a*a*a

Fixed submission:
a=input()
print a*a*a
Buggy python submission (verdict: Runtime Error):
a=input(); b=input();
print a*b; print a*2+b*2;

Fixed submission:
a,b=map(int,raw_input().split())
if 0<=b<=100 and 0<=b<=100:
    print a*b,
    print a*2+b*2
else:
    pass

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
print a*b
print a*2+b*2

Fixed submission:
a,b=map(int,raw_input().split())
if 0<=b<=100 and 0<=b<=100:
    print a*b,
    print a*2+b*2
else:
    pass
Buggy python submission (verdict: Runtime Error):
first = input().split()
n = int(first[0])
r = int(first[1])
while n != 0 or r != 0:
    i = 0
    card = list(range(n))
    while i < r:
        sh = input().split()
        p, c = list(map(int,sh))
        card = card[p-1:p+c-2:] + card[0:p-2:] + card[p+c-1:n:]
        i = i + 1
    print(n - int(card[0]))
    next = input().split()
    n, r = list(map(int,next))

Fixed submission:
first = input().split()
n = int(first[0])
r = int(first[1])
while n != 0 or r != 0:
    i = 0
    card = list(range(1,n+1))[::-1]
    while i < r:
        sh = input().split()
        p, c = list(map(int,sh))
        card = card[p-1:p+c-1] + card[:p-1] + card[p+c-1:]
        i = i + 1
    print(card[0])
    next = input().split()
    n, r = list(map(int,next))
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__' :
    n = int(input())
    a,b = [int(i) for i in input().split(" ")]
    for i in range(1,min(a,b)+1):
        if((a % i == 0) and (b % i == 0)):
            print(i)



Fixed submission:


if __name__ == '__main__' :
    n = int(input())
    s = [int(i) for i in input().split(" ")]
    for i in range(1,min(s)+1):
        if (sum(map(lambda x : x % i , s)) == 0): print(i)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
import math




if __name__ == '__main__' :
    n = int(input())
    R = [int(input()) for i in range(n)]
    tmp = [max(R[i+1::])  - R[i] for i in range(n-1)]
    print(max(tmp))



Fixed submission:
from collections import defaultdict
import math




if __name__ == '__main__' :
    n = int(input())
    R = [int(input()) for i in range(n)]
    maxv = R[1]-R[0]
    minv = min(R[0],R[1])
    for j in range(2,n):
        maxv = max(maxv,R[j]-minv)
        minv = min(minv,R[j])
    print(maxv)