Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
d = a // b
r = a % b
f = a / b
print(' '.join(map(str[d,r,f])))

Fixed submission:
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print(d, r, '{:.5f}'.format(f))
Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
area = math.pi * r**2 
circumference = 2 * math.pi * r
print(area, circumference)

Fixed submission:
import math

r = float(input())

area = math.pi * r**2
diameter =  2 * math.pi * r

print(area, diameter)

Buggy python submission (verdict: Runtime Error):
pi = 3.14159265358979
r = int(input())
area = pi * r**2 
circumference = 2 * pi * r
print(area, circumference)

Fixed submission:
import math

r = float(input())

area = math.pi * r**2
diameter =  2 * math.pi * r

print(area, diameter)
Buggy python submission (verdict: Runtime Error):
input()
xs = map(int, input().split())
print([f(xs) for f in [min,max,sum]])

Fixed submission:
n = input()
nums = list(map(int, input().split()))
print(min(nums), max(nums), sum(nums))

Buggy python submission (verdict: Runtime Error):
input()
xs = map(int, input().split())
print(' '.join(map(str,[f(xs) for f in [min,max,sum]])))

Fixed submission:
n = input()
nums = list(map(int, input().split()))
print(min(nums), max(nums), sum(nums))

Buggy python submission (verdict: Runtime Error):
input()
xs = map(int, input().split())
print(' '.join(map(str,[f(list(xs)) for f in [min,max,sum]])))

Fixed submission:
n = input()
nums = list(map(int, input().split()))
print(min(nums), max(nums), sum(nums))
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,n+1):
   x = i
   if x % 3 == 0:
        print('', i, end='')
    else:
        while True:
            if x % 10 == 3:
                print('', i, end='')
            x //= 10
            if x == 0:
                break

Fixed submission:
n = int(input())
for i in range(1, n+1):
    if i % 3 == 0 or '3' in str(i):
        print(f' {i}', end='')
print()
Buggy python submission (verdict: Runtime Error):
s = input()
n = int(input())
for _ in range(n):
    line = input().split()
    command, args = line[0], line[1:]
    if command == 'replace':
        s = s[:args[0]] + args[2] + s[args[1]:]
    elif command == 'reverse':
        s = s[:args[0]] + str(reversed(s[args[0]:args[1]])) + s[args[1]:]
    elif command == 'print':
        print(s)

Fixed submission:
s = input()
q = int(input())
for i in range(q):
    line = input()
    if 'print' in line:
        op, a, b = line.split()
        a = int(a)
        b = int(b)
        print(s[a:b+1])
    elif 'reverse' in line:
        op, a, b = line.split()
        a = int(a)
        b = int(b)
        reversed_substring = ''.join(list(reversed(s[a:b+1])))
        s = s[:a] + reversed_substring + s[b+1:]
    elif 'replace' in line:
        op, a, b, p = line.split()
        a = int(a)
        b = int(b)
        s = s[:a] + p + s[b+1:]
Buggy python submission (verdict: Runtime Error):
# coding:utf-8
import math

x1,y1,x2,y2=map(int,raw_input().split())

print(math.sqrt((x2-x1)**2+(y2-y1)**2))

Fixed submission:
# coding:utf-8
import math

x1,y1,x2,y2=list(map(float,input().split()))

print(math.sqrt((x2-x1)**2+(y2-y1)**2))

Buggy python submission (verdict: Runtime Error):
# coding:utf-8
import math

x1,y1,x2,y2=list(map(int,input().split()))

print(math.sqrt((x2-x1)**2+(y2-y1)**2))

Fixed submission:
# coding:utf-8
import math

x1,y1,x2,y2=list(map(float,input().split()))

print(math.sqrt((x2-x1)**2+(y2-y1)**2))
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
import math

r=int(input())
print("%.6f"%(2*math.pi*r)+" %.6f"%(math.pi*r**2))

Fixed submission:
#coding:utf-8
import math

r=float(input())
print("%.6f"%(math.pi*r**2)+" %.6f"%(2*math.pi*r))
Buggy python submission (verdict: Runtime Error):
#coding:utf-8

def call(n):
    i=1

    for i in range(1,n+1):
        x=i
        if x%3==0:
            print(" "+str(x),end="")
        else:
            while x!=0:
                if x%10==3:
                    print(" "+str(x),end="")
                    break
                else:
                    x/=10
                    
    print("")

n=int(input())
call(n)

Fixed submission:
#coding:utf-8

def call(n):
    for i in range(1,n+1):
        x=i
        if x%3==0:
            print(" "+str(i),end="")
        else:
            while x!=0:
                if x%10==3:
                    print(" "+str(i),end="")
                    break
                else:
                    x//=10
                    
    print("")

n=int(input())
call(n)

Buggy python submission (verdict: Runtime Error):
#coding:utf-8

def call(n):
    for i in range(1,n+1):
        x=i
        if x%3==0:
            print(" "+str(i,end="")
        else:
            while x!=0:
                if x%10==3:
                    print(" "+str(i),end="")
                    break
                else:
                    x//=10
                    
    print("")

n=int(input())
call(n)

Fixed submission:
#coding:utf-8

def call(n):
    for i in range(1,n+1):
        x=i
        if x%3==0:
            print(" "+str(i),end="")
        else:
            while x!=0:
                if x%10==3:
                    print(" "+str(i),end="")
                    break
                else:
                    x//=10
                    
    print("")

n=int(input())
call(n)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
import numpy as np

n=int(input())
x=list(map(int,input().split()))

for i in x[::-1]:
    print(str(i)+" ",end="")

print("")

Fixed submission:
#coding:utf-8
n=int(input())
x=list(map(int,input().split()))

for i,a in enumerate(x[::-1]):
    if i==n-1:
        print(str(a))
    else:
        print(str(a)+" ",end="")
Buggy python submission (verdict: Runtime Error):
count = 0
while true:
    count += 1
    n = int(input())
    if n == 0:
        break
    print('Case ' + str(count) + ' :' + str(n))

Fixed submission:
count = 0
while 1:
    count += 1
    n = int(input())
    if n == 0:
        break
    print('Case ' + str(count) + ': ' + str(n))
Buggy python submission (verdict: Runtime Error):
import sys
c=[0 for i in range(101)]
for n in sys.stdin:
	n=int(n)
	counter[n]+=1
m=max(c)
for i in range(101):
	if c[i]==m:
		print i

Fixed submission:
import sys
nums = map(int, sys.stdin)
counter = [0 for i in range(101)]
for n in nums:
	counter[n] += 1
m = max(counter)
for i in range(101):
	if m == counter[i]:
		print i
Buggy python submission (verdict: Runtime Error):
import math
n=input()
A=0
def is_prime(m):
 for i in range(2, int(math.sqrt(m))+1):
  if m%i==0:
   return False
  return True
for i in range(n):
 k=input()
 if is_prime(k):
 A+=1
print A

Fixed submission:
import math
n=input()
A=0
def is_prime(m):
 for i in range(2, int(math.sqrt(m))+1):
  if m%i==0:
   return False
 return True
for i in range(n):
 k=input()
 if is_prime(k):
  A+=1
print A
Buggy python submission (verdict: Runtime Error):
n=input()
h=n/3600
s=n%3600
m=s/60
s=s%60
print h:m:s

Fixed submission:
S = input()
s = S%60
m = S%3600/60
h = S/3600
print "%d:%d:%d"%(h,m,s)

Buggy python submission (verdict: Runtime Error):
n=input()
h=n/3600
s=n%3600
m=s/60
s=s%60
print str(h)+":"+str(m)+":"str(s)+":"

Fixed submission:
S = input()
s = S%60
m = S%3600/60
h = S/3600
print "%d:%d:%d"%(h,m,s)

Buggy python submission (verdict: Runtime Error):
n=input()
h=n/3600
s=n%3600
m=s/60
s=s%60
print str(h)+":"+str(m)+":"str(s)

Fixed submission:
S = input()
s = S%60
m = S%3600/60
h = S/3600
print "%d:%d:%d"%(h,m,s)
Buggy python submission (verdict: Runtime Error):
a=input b=input c=input
if a<b<c print Yes

Fixed submission:
n=map(int, raw_input().split(' '))
a=n[0]
b=n[1]
c=n[2]
if a<b<c:
  print "Yes"
else:
  print "No"
Buggy python submission (verdict: Runtime Error):
a,b=map(int,raw_input().split())
while a,b!=0,0
print b,a

Fixed submission:
while True:
	a,b=map(int,raw_input().split())
	if a==0 and b==0: break
	if a>b: print b,a
	else: print a,b
Buggy python submission (verdict: Runtime Error):
import math 
r=input()
print "%.9f"%(math.pi*r*r, math.pi*r*2)

Fixed submission:
import math 
r=input()
print "%.9f"%(math.pi*r*r), math.pi*r*2
Buggy python submission (verdict: Runtime Error):
def generate_square(rest, output=[10000]):                   
  for i in range(rest, 0, -1):                               
    if output[-1] >= i:                                      
        yield from generate_square(rest - i, output + [i])   
  if rest == 0:                                              
    yield output                                             
                                                             
                                                             
while 1:                                                     
  x = int(input().strip())                                   
  if x == 0:                                                 
    break                                                    
  generator = generate_square(x)                             
  for x in generator:                                        
    print(" ".join(map(str, x[1:])))                         
GN-2:python kodairatomonori$                                 
                                                             
                                                             

Fixed submission:
def generate_square(rest, output=[10000]):                   
  for i in range(rest, 0, -1):                               
    if output[-1] >= i:                                      
        yield from generate_square(rest - i, output + [i])   
  if rest == 0:                                              
    yield output                                             
                                                             
                                                             
while 1:                                                     
  x = int(input().strip())                                   
  if x == 0:                                                 
    break                                                    
  generator = generate_square(x)                             
  for x in generator:                                        
    print(" ".join(map(str, x[1:])))
Buggy python submission (verdict: Runtime Error):
students = list(range(30))
[students.remove(int(input())) for _ in range(28)] 
[print(student) for student in students]

Fixed submission:
students = list(range(1, 31))
[students.remove(int(input())) for _ in range(28)] 
[print(student) for student in students]
Buggy python submission (verdict: Time Limit Exceeded):
def main():
	import sys

	MAX = 1000000

	table = [True]*1000000
	table[0] = table[1] = False

	primes = []
	counted = 0

	for line in sys.stdin:
		n = int(line)
		if n > counted:
			for i in range(int(n+1)):
				if table[i] and not i in primes:
					primes.append(i)
					for j in range(2*i, MAX, i):
						table[j] = False
			counted = n

		cnt = 0
		for prime in primes:
			if prime > n:
				break
			else:
				cnt += 1
		print(primes)
		print(cnt)


if __name__ == '__main__':
	main()

Fixed submission:
def main():
	import sys

	MAX = 1000000

	table = [True]*1000000
	table[0] = table[1] = False

	primes = []
	counted = 0

	for i in range(MAX):
		if table[i]:
			primes.append(i)
			for j in range(2*i, MAX, i):
				table[j] = False

	for line in sys.stdin:
		n = int(line)

		cnt = 0
		for prime in primes:
			if prime > n:
				break
			else:
				cnt += 1
		print(cnt)


if __name__ == '__main__':
	main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
	n = int(input())
	dictionary = []

	for _ in range(n):
		order, code = input().split()
		if order == 'insert':
			dictionary.append(code)
		elif order == 'find':
			if code in dictionary:
				print('yes')
			else:
				print('no')
		else:
			raise Exception('InputError')

if __name__ == '__main__':
	main()

Fixed submission:
def main():
	n = int(input())
	dictionary = {}

	for _ in range(n):
		order, code = input().split()
		if order == 'insert':
			dictionary[code] = 1
		elif order == 'find':
			if code in dictionary:
				print('yes')
			else:
				print('no')
		else:
			raise Exception('InputError')

if __name__ == '__main__':
	main()
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
s=input()
s=int(s)*int(s)*int(s)
print(s)
input()

Fixed submission:
#coding:utf-8
s=input()
s=int(s)*int(s)*int(s)
print(s)

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

Fixed submission:
#coding:utf-8
s=input()
s=int(s)*int(s)*int(s)
print(s)
Buggy python submission (verdict: Runtime Error):
l=map(int,input().split())
print l[0]*l[1],l[0]*2+l[1]*2

Fixed submission:
l = list(map(int, input().split()))
print (l[0]*l[1],l[0]*2+l[1]*2)
Buggy python submission (verdict: Runtime Error):
l = list(map(int, input().split()))
if l[0] == l[1]:
    print(l[0]+" == "+l[1])
elif l[0]<l[1]:
    print(l[0]+" < "+l[1])
else:
    print(l[0]+" > "+l[1])

Fixed submission:
l = list(map(int, input().split()))
if l[0] == l[1]:
    print("a == b")
elif l[0]<l[1]:
    print("a < b")
else:
    print("a > b")
Buggy python submission (verdict: Runtime Error):
for i in int(input()):
	values = sorted(map(lambda x: x^2, input().split()))
	if values[2] = values[1] + values[0]:
		print 'YES'
	else:
		print 'NO'


Fixed submission:
def judge_triangle(edges):
    edges.sort(reverse = True)
    if edges[0]**2 == edges[1]**2 + edges[2]**2:
        return 'YES'
    else:
        return 'NO'

lines = int(input())

for i in range(lines):
    edges = list(map(int, raw_input().split()))
    print judge_triangle(edges)

Buggy python submission (verdict: Runtime Error):
for i in int(input()):
	values = sorted(map(lambda x: int(x)^2, input().split()))
	if values[2] == values[1] + values[0]:
		print 'YES'
	else:
		print 'NO'


Fixed submission:
def judge_triangle(edges):
    edges.sort(reverse = True)
    if edges[0]**2 == edges[1]**2 + edges[2]**2:
        return 'YES'
    else:
        return 'NO'

lines = int(input())

for i in range(lines):
    edges = list(map(int, raw_input().split()))
    print judge_triangle(edges)

Buggy python submission (verdict: Runtime Error):
for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, input().split()))
	if values[2] == values[1] + values[0]:
		print 'YES'
	else:
		print 'NO'


Fixed submission:
def judge_triangle(edges):
    edges.sort(reverse = True)
    if edges[0]**2 == edges[1]**2 + edges[2]**2:
        return 'YES'
    else:
        return 'NO'

lines = int(input())

for i in range(lines):
    edges = list(map(int, raw_input().split()))
    print judge_triangle(edges)

Buggy python submission (verdict: Runtime Error):
for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, raw_input().split()))
	if values[2] == values[1] + values[0]:
		print('YES')
	else:
		print('NO')


Fixed submission:
def judge_triangle(edges):
    edges.sort(reverse = True)
    if edges[0]**2 == edges[1]**2 + edges[2]**2:
        return 'YES'
    else:
        return 'NO'

lines = int(input())

for i in range(lines):
    edges = list(map(int, raw_input().split()))
    print judge_triangle(edges)
Buggy python submission (verdict: Runtime Error):
for i in range(int(input())):
    doc = input().split()
    ans = []
    for s in doc:
        if 'Hoshino' in s:
            while 'Hoshino' in s:
                t = s.find('Hoshino')
                s = s[:t] + 'Hoshina' + s[s+7:]
        ans.append(s)
    print ' '.join(ans)


Fixed submission:
for i in range(int(input())):
    print(input().replace('Hoshino', 'Hoshina'))

Buggy python submission (verdict: Runtime Error):
for i in range(int(input())):
    doc = input().split()
    ans = []
    for s in doc:
        if 'Hoshino' in s:
            while 'Hoshino' in s:
                t = s.find('Hoshino')
                s = s[:t] + 'Hoshina' + s[s+7:]
        ans.append(s)
    print ' '.join(ans)


Fixed submission:
for i in range(int(input())):
    print(input().replace('Hoshino', 'Hoshina'))

Buggy python submission (verdict: Runtime Error):
for i in range(int(input())):
    print input().replace('Hoshino', 'Hoshina')


Fixed submission:
for i in range(int(input())):
    print(input().replace('Hoshino', 'Hoshina'))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
while True:
	try:	
		a, b = (int(s) for s in input().split(" "))
		print len(str(a + b))
	except:
		break


Fixed submission:
# -*- coding: utf-8 -*-
import sys
for s in sys.stdin:
	print len(str(int(s.rstrip().split()[0])+int(s.rstrip().split()[1])))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
for s in sys.stdin:
	print len(int(s.rstrip().split()[0])+int(s.rstrip().split()[1]))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
for s in sys.stdin:
	print len(str(int(s.rstrip().split()[0])+int(s.rstrip().split()[1])))
Buggy python submission (verdict: Runtime Error):
x=input
print(x**3)

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

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

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

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

Fixed submission:
a=input()
a=int(a)
a=a**3
print (a)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
print(a*b)

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

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

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

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

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

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

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

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

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

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(a*b,2*a+2*b)

Fixed submission:
a,b=map(int,input().split())
print(a*b,2*a+2*b)
Buggy python submission (verdict: Runtime Error):
print(pow(int(input()),int(input()),int(1e9+7)))


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

print(pow(n,m,int(1e9+7)))
Buggy python submission (verdict: Runtime Error):
i = input_raw()
print int(i) ** 3

Fixed submission:
i = int(input())
print i * i * i

Buggy python submission (verdict: Runtime Error):
whit True:
  i = raw_input()
  print int(i) ** 3

Fixed submission:
i = int(input())
print i * i * i

Buggy python submission (verdict: Runtime Error):
i = input_raw()
print int(i) ** 3

Fixed submission:
i = int(input())
print i * i * i

Buggy python submission (verdict: Runtime Error):
i = input_raw()
print int(i) ** 3

Fixed submission:
i = int(input())
print i * i * i
Buggy python submission (verdict: Runtime Error):
# The question itself is not diffifult, but the website only 
# tested my code with two cases, so I am not sure whether the 
# "accepted" is trustworthy.

# Note: math.inf > math.inf -> False

import math
V = int(input())
E = int(input())
fees = [[math.inf] * V for i in range(V)]
for i in range(V): 
	fees[i][i] = 0
for i in range(E):
	a, b, c, d = map(int, input().split(','))
	fees[a-1][b-1] = c
	fees[b-1][a-1] = d
start, end, funding, cost = map(int, input().split(','))
for i in range(V):
	for j in range(V):
		for k in range(V):
			if (fees[j][k] > fees[j][i] + fees[i][k]):
				fees[j][k] = fees[j][i] + fees[i][k]
if (fees[start-1][end-1]==math.inf or fees[end-1][start-1]==math.inf):
	print(0)
else:
	print(funding-cost-fees[start-1][end-1]-fees[end-1][start-1])

Fixed submission:
# The question itself is not diffifult, but the website only 
# tested my code with two cases, so I am not sure whether the 
# "accepted" is trustworthy.

# Note: math.inf > math.inf -> False

import math
V = int(input())
E = int(input())
fees = [[math.inf] * V for i in range(V)]
for i in range(V): 
	fees[i][i] = 0
for i in range(E):
	a, b, c, d = map(int, input().split(','))
	fees[a-1][b-1] = c
	fees[b-1][a-1] = d
start, end, funding, cost = map(int, input().split(','))
for i in range(V):
	for j in range(V):
		for k in range(V):
			if (fees[j][k] > fees[j][i] + fees[i][k]):
				fees[j][k] = fees[j][i] + fees[i][k]
if (fees[start-1][end-1]==math.inf or fees[end-1][start-1]==math.inf):
	print(0)
else:
	print(funding-cost-fees[start-1][end-1]-fees[end-1][start-1])
Buggy python submission (verdict: Runtime Error):
# It took me about 40 minutes to finsih this assignment.
# The task itself is relatively simple, since we have sample code on handouts.
# One problem I met was that in case 22, I had a "RecursionError" (maximum recursion depth exceeded in comparison).
# The solution was simple: import sys, and add a line "sys.setrecursionlimit(100000)".

#import sys

line = input().split()
n = int(line[0])
q = int(line[1])
mat = [0]*n
for i in range(n):
	mat[i]=i
#sys.setrecursionlimit(100000)

def root(a):
	if mat[a]==a:
		return a
	else:
		mat[a] = root(mat[a])
		return mat[a]

def union(a, b):
	mat[root(a)]=root(b)

def is_same(a,b):
	if root(a) == root(b):
		return 1
	else:
		return 0

for i in range(q):
	line = input().split()
	a = int(line[0])
	line[1]=int(line[1])-1
	line[2]=int(line[2])-1
	if a==0:
		union(mat[line[1]],mat[line[2]])
	if a==1:
		print(is_same(mat[line[1]],mat[line[2]]))

Fixed submission:
# It took me about 40 minutes to finsih this assignment.
# The task itself is relatively simple, since we have sample code on handouts.
# One problem I met was that in case 22, I had a "RecursionError" (maximum recursion depth exceeded in comparison).
# The solution was simple: import sys, and add a line "sys.setrecursionlimit(100000)".

import sys

line = input().split()
n = int(line[0])
q = int(line[1])
mat = [0]*n
for i in range(n):
	mat[i]=i
sys.setrecursionlimit(100000)

def root(a):
	if mat[a]==a:
		return a
	else:
		mat[a] = root(mat[a])
		return mat[a]

def union(a, b):
	mat[root(a)]=root(b)

def is_same(a,b):
	if root(a) == root(b):
		return 1
	else:
		return 0

for i in range(q):
	line = input().split()
	a = int(line[0])
	line[1]=int(line[1])-1
	line[2]=int(line[2])-1
	if a==0:
		union(mat[line[1]],mat[line[2]])
	if a==1:
		print(is_same(mat[line[1]],mat[line[2]]))
Buggy python submission (verdict: Runtime Error):
n = input()
integer = list(map(int, input().split()))

min = integer[0]
max = integer[0]
sum = 0

for i in range(len(integer)):
    if max<i:
        max = i
    if i < min:
        min = i
    sum += i

print(min+" "+ max +" "+ sum)

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

min = integer[0]
max = integer[0]
sum = 0
for i in integer:
    if max<i:
        max = i
    if i < min:
        min = i
    sum += i

print(str(min)+" "+ str(max) +" "+ str(sum))

Buggy python submission (verdict: Runtime Error):
n = input()
integer = list(map(int, input().split()))

min = integer[0]
max = integer[0]
sum = 0

for i in range(len(integer)):
    if max<i:
        max = i
    if i < min:
        min = i
    sum += i

print(min+" "+ max +" "+ sum)

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

min = integer[0]
max = integer[0]
sum = 0
for i in integer:
    if max<i:
        max = i
    if i < min:
        min = i
    sum += i

print(str(min)+" "+ str(max) +" "+ str(sum))