qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a,b,c = map(int,input().split())
count=0
for i in range(a,b+1):
    if i%c==0:
        count+=1
print(count)

Fixed code:
a,b,c = map(int, input().split())
count = 0

if(a == b and b == c):
    print(1)

else:
    for i in range(a,b+1):
        if(c % i == 0):
            count+=1
    print(count)
Buggy code:
counter=0
a,b,c=map(int,input().split())
for i in range(a,b):
    if((c%i)==0) counter=counter+1
print(f"{counter}")



Fixed code:
counter=0
a,b,c=map(int,input().split())
for i in range(a,b+1):
    if((c%i)==0):
        counter=counter+1
print(f"{counter}")
Buggy code:
a, b, c = map (int, input().split())
count = 0
for i in range(a, b+1):
    print (i)
    if c % i == 0:
        count += 1

print (count)

Fixed code:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)
Buggy code:
a, b, c = map(int, input().split())

yakusuu = []

for i in range(a, b+1):

    if (c % a == 0) and (c % b == 0):
 
        yakusuu.append(i)

print(len(yakusuu))


Fixed code:
a, b, c = map(int, input().split())

yakusuu = []

for i in range(a, b+1):

    if (c % i == 0):
 
        yakusuu.append(i)

print(len(yakusuu))
Buggy code:
i=0
a,b,c = map(int,input().split())
for x in range(a+1,b):
  if c % x == 0: i+=1
print(i)


Fixed code:
a, b, c = map(int, input(). split())
ans = 0
for i in range(a, b+1):
    if c%i == 0:
       ans += 1 
print(ans)
Buggy code:
i=0
a,b,c = map(int,input().split())
for x in range(a+1,b):
  if c % x == 0: i+=1
print(str(i))


Fixed code:
a,b,c = map(int, input().split())
i = 0
for x in range(a, b + 1):
    if c%x == 0:
        i += 1
print(i)
Buggy code:
a,b,c = map(int, input().split())

print [i for i in range(a,b+1) if c % i == 0]

Fixed code:
a, b, c = map(int, input().split())

X = [i for i in range(a,b+1) if c % i == 0]
print(len(X))
Buggy code:
a, b, c = [int(w) for w in input().split()]
print(len([i for i in range(a, b+1) if i % c == 0]))

Fixed code:
a, b, c = [int(w) for w in input().split()]
print(len([i for i in range(a, b+1) if c % i == 0]))
Buggy code:
a,b,c=input().split()
count=0
for i in range(a,b+1) :
    if c%i == 0:
        count += 1
print(count)

Fixed code:
a,b,c=map(int,input().split())
count=0
for i in range(a,b+1) :
    if c%i == 0:
        count += 1
print(count)
Buggy code:
a,b,c=map(int,input().split())
d=[i for i in range(a,b+1)]
count=0
for i in range(len(d)):
    if c%i==0:
        count+=1
print(count)

Fixed code:
a,b,c=map(int,input().split())
d=[i for i in range(a,b+1)]
count=0
for i in d:
    if c%i==0:
        count+=1
print(count)
Buggy code:
a,b,c=int(input()).split()
count=0
for i in range(a,b+1) :
    if c%i == 0:
        count += 1
print(count)

Fixed code:
a,b,c = [int(i) for i in input().split()]
count = 0
for i in range(a,b+1):
    if c % i == 0:
        count += 1
print(count)
Buggy code:
number_list=[int(i) for i in input().split()]
counter=0
for r in range(number_list[0],number_list[1]):
    if number_list[2]%r==0:
        print(r)
        counter+=1
print(counter)

Fixed code:
number_list=[int(i) for i in input().split()]
counter=0
for r in range(number_list[0],number_list[1]+1):
    if number_list[2]%r==0:
        counter+=1
print(counter)
Buggy code:
n = int(input().rstrip())
min = 1000000
max = -1000000
sum = 0
for i in range(n):
    x = int(input().rstrip())
    if x < min:
        min = x
    if x > max:
        max = x
    sum += x
print("%d %d %d", % (min,max,sum))

Fixed code:
n = int(input())
s = input().rstrip().split(" ")
min = 1000000
max = -1000000
sum = 0
for i in s:
    x = int(i)
    if x < min:
        min = x
    if x > max:
        max = x
    sum += x
print("%d %d %d" % (min,max,sum))
Buggy code:
input()
xs = map(int, input().split())
print(' '.join(map(str,[f(list(xs)) for f in [min,max,sum]])))

Fixed code:
input()
xs = list(map(int, input().split()))
print(' '.join(map(str,[f(xs) for f in [min,max,sum]])))
Buggy code:
n = input()
integer = list(map(int, input().split()))

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

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

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

Fixed code:
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 code:
n=int(input())
l=list(map(int,input().split()))
print('%d %d %d'%(min(l), max(l), sum(l))

Fixed code:
n=int(input())
l=list(map(int,input().split()))
print('%d %d %d'%(min(l), max(l), sum(l)))
Buggy code:
input()
a = [int(i), for i in input().split()]
print(min(a), max(a), sum(a))

Fixed code:
_ = input()
a = [int(i) for i in input().split()]

print(min(a), max(a), sum(a))
Buggy code:

nums1 = []
sum = 0
for i in range(2):
    nums = [int(e) for e in input().split()]
    nums1.append(nums)

for i in range(len(nums1[1])):
    for j in range(i):
        if nums1[1][i]<nums1[1][j]:
            max = nums1[1][j]

for i in range(len(nums1[1])):
    for j in range(i):
        if nums1[1][i]>nums1[1][j]:
            min = nums1[1][j]

for i in range(len(nums1[1])):
    sum = sum + nums1[1][i]
    
print(min, max, sum)


Fixed code:

nums1 = []
sum = 0
for i in range(2):
    nums = [int(e) for e in input().split()]
    nums1.append(nums)

max = nums1[1][0]
min = nums1[1][0]
sum = 0

for i in range(len(nums1[1])):
    if nums1[1][i]>max:
        max = nums1[1][i]
    if nums1[1][i]<min:
        min = nums1[1][i]
    sum = sum + nums1[1][i]
    
print(min, max, sum)
Buggy code:
n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
a=sum(ns)
i=min(ns)
u=max(ns)
print(amin,amax,asum)


Fixed code:
n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
asum=sum(ns)
amin=min(ns)
amax=max(ns)
print(amin,amax,asum)
Buggy code:
n = int(input())
a = input().split()

int_a = []
for i in range(n):
    int_a.append(int(a[i]))

print("{} {} {}".format(max(int_a), min(int_a), sum(int_a)))



Fixed code:
n = int(input())
a = input().split()

int_a = []
for i in range(n):
    int_a.append(int(a[i]))

print("{} {} {}".format(min(int_a), max(int_a), sum(int_a)))
Buggy code:
n = int(input())

s = input().split()
max = s[0]
min = s[0]
for i in range(n):
    if max < s[i]:
        max = s[i]
    if min > s[i]:
        min = s[i]

sum = min + max
print(min, end =" ")
print(max, end =" ")
print(sum)


Fixed code:
n = int(input())

s = list(map(int, input().strip().split(' ')))

max = s[0]
min = s[0]
sum = 0
for i in range(n):
    sum = sum + s[i]
    if max < s[i]:
        max = s[i]
    if min > s[i]:
        min = s[i]

print(min, end =" ")
print(max, end =" ")
print(sum)
Buggy code:
n = int(input())
a = input().split()
min = int(a[0])
max = int(a[0])
sum = 0
for i in a:
    if min > int(i):
        min = int(i)
    if max < int(i):
        max = int(i)
    sum += int(i)
print("{0} {1} {2}".format(max, min, sum))

Fixed code:
n = int(input())
a = input().split()
min = int(a[0])
max = int(a[0])
sum = 0
for i in a:
    if min > int(i):
        min = int(i)
    if max < int(i):
        max = int(i)
    sum += int(i)
print("{0} {1} {2}".format(min, max, sum))
Buggy code:
n = int(input())
a = input().split()
for i in range(n)
 a[i] = int(a[i])

print("{} {} {}".format(min(a), max(a), sum(a)))

Fixed code:
n = int(input())
a = input().split()
for i in range(n):
 a[i] = int(a[i])

print("{} {} {}".format(min(a), max(a), sum(a)))
Buggy code:
a = input()
num = input()
num_1 = num.split()
s = 0
cnt = 0
for i in range(len(num_1)):
    s += int(num_1[cnt])
    cnt += 1

b = []
cnt = 0
for i in range(len(num_1)):
    b.append(num_1[cnt])
    cnt += 1

print(min(b),max(b),s)

Fixed code:
a = input()
num = input()
num_1 = num.split()
s = 0
cnt = 0
for i in range(len(num_1)):
    s += int(num_1[cnt])
    cnt += 1

b = []
cnt = 0
for i in range(len(num_1)):
    b.append(int(num_1[cnt]))
    cnt += 1

print(min(b),max(b),s)
Buggy code:
n=int(input())
numbers=input().split()
sorted(numbers, key=int)
print(numbers[0], numbers[-1], sum(map(int, numbers)))

Fixed code:
n=int(input())
numbers=input().split()
numbers = sorted(numbers, key=int)
print(numbers[0], numbers[-1], sum(map(int, numbers)))
Buggy code:
n=int(input())
r=input().split()
for i in range(len(r)):
    r[i]=int(r[i])
s=sum(r)
m=min(r)
ma=max(r)
print(m ma s)


Fixed code:
n=int(input())
r=input().split()
for i in range(len(r)):
    r[i]=int(r[i])
s=sum(r)
m=min(r)
ma=max(r)
print(m,ma,s)
Buggy code:
n = int(input())
print (n)
a = [0] * n

a = list(map(int, input().split()))

print (min(a))
print (max(a))
print (sum(a))

Fixed code:
n = int(input())
a = [0] * n
a = list(map(int, input().split()))
print (min(a),max(a),sum(a))
Buggy code:
a = list(map(int, input().split()))
print(min(a),max(a),sum(a))


Fixed code:
input()
a = list(map(int, input().split()))
print(min(a),max(a),sum(a))
Buggy code:
input()
nums = [ int(i) for i in input().split()]
   
print( min(nums), max(nums), 

Fixed code:
input()
nums = [ int(i) for i in input().split()]
   
print( min(nums), max(nums), sum(nums))
Buggy code:
n = int(input())
i = 0

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

mx = max(x)
mn = min(x)
sum = 0

while i < n:
    sum = sum + x[i]
    i += 1
    
print(min, mx, sum)

Fixed code:
n = int(input())
i = 0

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

mx = max(x)
mn = min(x)
sum = 0

while i < n:
    sum = sum + x[i]
    i += 1
    
print(mn, mx, sum)
Buggy code:
n = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
print("{0} {1} {2}".format(max(a), min(a), sum(a)))

Fixed code:
n = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
print("{0} {1} {2}".format(min(a), max(a), sum(a)))
Buggy code:
hoge = int(input())
l = [int(i) for i in input().split()]

mx = max(l)
mn = min(l)
sm = sum(l)

print(mx,mn,sm)

Fixed code:
hoge = int(input())
l = [int(i) for i in input().split()]

mn = min(l)
mx = max(l)
sm = sum(l)

print(mn,mx,sm)
Buggy code:


ns=input().split()
for i in range(len(ns)):
     ns[i]=int(ns[i])
asum=sum(ns)
amin=min(ns)
amax=max(ns)
print(amin, amax,asum)


Fixed code:

n=input()
ns=input().split()
for i in range(len(ns)):
     ns[i]=int(ns[i])
asum=sum(ns)
amin=min(ns)
amax=max(ns)
print(amin, amax,asum)
Buggy code:
n = input()
l = [int(i) for i in input().split()]
print(' '.join([str(min(l)),str(max(l)),str(sum(l))])

Fixed code:
n = input()
l = [int(i) for i in input().split()]
print(' '.join([str(min(l)),str(max(l)),str(sum(l))]))
Buggy code:
# -*-coding:utf-8

#import fileinput
import math

def main():

    num = int(input())

    inputLine = input()
    array = list(map(int, inputLine.strip().split()))

    mx = max(array)
    mn = min(array)
    sm = sum(array)

    print('%d %d %d' % (mx, mn, sm))

if __name__ == '__main__':
    main()

Fixed code:
# -*-coding:utf-8

#import fileinput
import math

def main():

    num = int(input())

    inputLine = input()
    array = list(map(int, inputLine.strip().split()))

    mx = max(array)
    mn = min(array)
    sm = sum(array)

    print('%d %d %d' % (mn, mx, sm))

if __name__ == '__main__':
    main()
Buggy code:
n = int(input())
a = list(map(int, input().split())

print(min(a),max(a),sum(a))


Fixed code:
n = int(input())
a = list(map(int, input().split()))

print(min(a),max(a),sum(a))
Buggy code:
n=int(input())

l=input().split()

b=min(l)
a=max(l)

result=0
while n>=1:
    result=result+int(l[n-1])
    n=n-1

print(str(b)+" "+str(a)+" "+str(result))



Fixed code:
n=int(input())

l=input().split()

b=min(map(int,l))
a=max(map(int,l))

result=0
while n>=1:
    result=result+int(l[n-1])
    n=n-1

print(str(b)+" "+str(a)+" "+str(result))
Buggy code:

n = int(input())
dat = list(map(int. input().split()))
print(min(dat). max(dat). sum(dat))

Fixed code:

n = int(input())
dat = list(map(int, input(). split()))
print(min(dat), max(dat), sum(dat))
Buggy code:
n = int(input())
l = list(map(int, input().split()))

sum = 0
for i in range(n):
    sum += l[i]

print(sum(l))


Fixed code:
n = int(input())
l = list(map(int, input().split()))

sum = 0
for i in range(n):
    sum += l[i]

print(min(l), max(l), sum)
Buggy code:
n = int(input())
ns = list(map(int, input().split()))
print(n)

print(min(ns), max(ns), sum(ns))


Fixed code:
n = int(input())
ns = list(map(int, input().split()))


print(min(ns), max(ns), sum(ns))
Buggy code:
# 09-Computation-Min_Max_and_Sum.py

# ????°????????????§??????????¨????
# n ????????´??° ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????

# Input
# ??????????????´??°?????° n ???????????????????????????????????? n ????????´??° ai ????????????????????§?????????????????????
# Output
# ????°????????????§??????????¨????????????????????????§????????????????????????????????????

# Constraints
# 0<n???10000
# ???1000000???ai???1000000
# Sample Input
# 5
# 10 1 5 4 17
# Sample Output
# 1 17 37

num_min = 100001
num_max = -100001
num_sum = 0
num = int(input())

# a = []
# a = [ *map(int,input().split() ) ]
a = input().split()
print(a)
for i in range(num):
	a[i]=int(a[i])

for i in range(num):
	if a[i]<num_min:
		num_min = a[i]

	if a[i]>num_max:
		num_max = a[i]

	num_sum+=a[i]

print("{0} {1} {2}".format(num_min,num_max,num_sum) );

Fixed code:
# 09-Computation-Min_Max_and_Sum.py

# ????°????????????§??????????¨????
# n ????????´??° ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????

# Input
# ??????????????´??°?????° n ???????????????????????????????????? n ????????´??° ai ????????????????????§?????????????????????
# Output
# ????°????????????§??????????¨????????????????????????§????????????????????????????????????

# Constraints
# 0<n???10000
# ???1000000???ai???1000000
# Sample Input
# 5
# 10 1 5 4 17
# Sample Output
# 1 17 37

num_min = 1000001
num_max = -1000001
num_sum = 0
num = int(input())

# a = []
# a = [ *map(int,input().split() ) ]
a = input().split()

for i in range(num):
	a[i]=int(a[i])
	if a[i]<num_min:
		num_min = a[i]

	if a[i]>num_max:
		num_max = a[i]

	num_sum+=a[i]

print("{0} {1} {2}".format(num_min,num_max,num_sum) );
Buggy code:
n = int(input().split())
list = list(map(int, input().split()))

sum = 0
for i in range(n):
    sum += list[i]

print(min(list), max(list), sum)


Fixed code:
n = int(input())
A = list(map(int,input().split()))
sum = 0
for i in range(len(A)):
    sum += A[i]
print(min(A),max(A),sum)
Buggy code:
n = int(input())
num = [int(i) for i in input().split()]
print("{} {} {}".format(mix(num),max(num),sum(num))



Fixed code:
n = int(input())
num = [int(i) for i in input().split()]
print("{} {} {}".format(min(num),max(num),sum(num)))
Buggy code:
def main():
    n = int(input())
    lst = list(map(int, input().split()))

    print(min(numlst), max(numlst), sum(numlst))

if __name__ == '__main__':
    main()



Fixed code:
def main():
    n = int(input())
    lst = list(map(int, input().split()))

    print(min(lst), max(lst), sum(lst))

if __name__ == '__main__':
    main()
Buggy code:
lst = list(map(int, input().split()))
print(min(lst), max(lst), sum(lst))


Fixed code:
n=int(input())
lst=list(map(int,input().split()))
print(min(lst), max(lst), sum(lst))
Buggy code:
a = list(map(int, input().split()))
a.sort()
mi = a[0]
mx = a[-1]
sm = sum(a)
print('%d %d %d' % (mi, mx, sm))

Fixed code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
mi = a[0]
mx = a[-1]
sm = sum(a)
print('%d %d %d' % (mi, mx, sm))
Buggy code:
n=list(map(int,input().split()))
a=min(n)
b=max(n)
c=sum(n)
print(a,b,c)


Fixed code:
k=input()
n=list(map(int,input().split()))
a=min(n)
b=max(n)
c=sum(n)
print(a,b,c)
Buggy code:
x = input())
a = list(map(int, input().split()))
print("%d %d %d"%(min(a), max(a), sum(a)))


Fixed code:
x = input()
a = list(map(int, input().split()))
print("%d %d %d"%(min(a), max(a), sum(a)))
Buggy code:
n = input()
a = input().split(' ')
nums = [int(str) for str in a]
sum = 0
nums.sort()
max = num[n-1]
min = num[0]
for i in nums:
 sum += i
print("{0} {1} {2}".format(min,max,sum))

Fixed code:
n = int(input())
a = input().split(' ')
num = [int(str) for str in a]
sum = 0
num.sort()
max = num[n-1]
min = num[0]
for i in num:
 sum += i
print("{0} {1} {2}".format(min,max,sum))
Buggy code:
n = int(input())
n_list = [int(i) for i in input().split(" ")]
mini = min(n_list)
maxi = max(n_list)
total = sum(n_list)

print('{0} {1} {2}'.format(mini, maxi, total)

Fixed code:
n = int(input())
n_list = [int(i) for i in input().split(" ")]
mini = min(n_list)
maxi = max(n_list)
total = sum(n_list)

print('{0} {1} {2}'.format(mini, maxi, total))
Buggy code:
import sys
input()
x = list(map(int,sys.stdin.readlines().split()))
print("{0} {1} {2}".format(min(x),max(x),sum(x)))

Fixed code:
import sys
input()
x = list(map(int,sys.stdin.readline().split()))
print("{0} {1} {2}".format(min(x),max(x),sum(x)))
Buggy code:
s=int(input())
x=[int(i) for i in input().split()]
print("{0},{1},{2}".format(min(x),max(x),sum(x)))

Fixed code:
s=int(input())
x=[int(i) for i in input().split()]
print("{0} {1} {2}".format(min(x),max(x),sum(x)))
Buggy code:
a = list(map(int,input().split()))
print(min(a),max(a),sum(a))

Fixed code:
input()
a = list(map(int, input().split()))
print(min(a) ,max(a) ,sum(a))
Buggy code:
n=int(input())
list=sorted([int(x) for x in input().split()])
print(a[0],a[-1],sum(list))

Fixed code:
n=int(input())
list=sorted([int(x) for x in input().split()])
print(list[0],list[-1],sum(list))
Buggy code:
#
# my_value_list = []
#
# while True:
#     try:
#         my_value_list.append(input().split())
#     except EOFError:
#         break
#
# for i in range(0, len(my_value_list)):
#     if my_value_list[i][1] == "+":
#         print(int(my_value_list[i][0]) + int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "-":
#         print(int(my_value_list[i][0]) - int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "/":
#         print(int(my_value_list[i][0]) // int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "*":
#         print(int(my_value_list[i][0]) * int(my_value_list[i][2]))
#     else:
#         break

my_value = int(input())
my_value_list_str = input().split()

my_value_list = [int(i) for i in my_value_list_str]
my_value_list.sort()

print("{} {} {}".format(my_value_list[my_value-1], my_value_list[0], sum(my_value_list)))

Fixed code:
#
# my_value_list = []
#
# while True:
#     try:
#         my_value_list.append(input().split())
#     except EOFError:
#         break
#
# for i in range(0, len(my_value_list)):
#     if my_value_list[i][1] == "+":
#         print(int(my_value_list[i][0]) + int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "-":
#         print(int(my_value_list[i][0]) - int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "/":
#         print(int(my_value_list[i][0]) // int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "*":
#         print(int(my_value_list[i][0]) * int(my_value_list[i][2]))
#     else:
#         break

my_value = int(input())
my_value_list_str = input().split()

my_value_list = [int(i) for i in my_value_list_str]
my_value_list.sort()

print("{} {} {}".format(my_value_list[0], my_value_list[my_value-1], sum(my_value_list)))
Buggy code:
n=int(input())
num=[int(i) for i in input().split()]
# num=[1,2,3,4,6]
M=max(num)
m=min(num)
s=sum(num)
print("{0} {1} {2}".format(M,m,s))

Fixed code:
n=int(input())
num=[int(i) for i in input().split()]
# num=[1,2,3,4,6]
M=max(num)
m=min(num)
s=sum(num)
print("{0} {1} {2}".format(m,M,s))
Buggy code:
input()

data = [int(x) for x in input().input()]

print(min(data),max(data),sum(data))

Fixed code:
input()

data = [int(x) for x in input().split()]

print(min(data),max(data),sum(data))
Buggy code:
N = int(input())
num = input()
list = num.split()
print(list[1])
max = sum = min = int(list[0])
for x in range(N - 1):
    a = int(list[x + 1])
    if a > max: max = a
    elif a < min: min = a
    sum += a
print(min, max, sum)
    


Fixed code:
N = int(input())
num = input()
list = num.split()
max = sum = min = int(list[0])
for x in range(N - 1):
    a = int(list[x + 1])
    if a > max: max = a
    elif a < min: min = a
    sum += a
print(min, max, sum)
Buggy code:
x = [int(i) for i in input().split()]
x.pop(0)

M = max(x)
m = min(x)
s = sum(x)

print("{0} {1} {2}".format(m,M,s))

Fixed code:
input()
x = [int(i) for i in input().split()]

M = max(x)
m = min(x)
s = sum(x)

print("{0} {1} {2}".format(m,M,s))
Buggy code:
n = int(input())
a = [int(i) for i in input().split]
print(min(a), max(a), sum(a))



Fixed code:
n = int(input())
a = [int(i) for i in input().split()]
print(min(a), max(a), sum(a))
Buggy code:
n = int(input())
L = map(int, input().split())
print(min(L), max(L), sum(L))

Fixed code:
n = int(input())
L = list(map(int, input().split()))
print(min(L), max(L), sum(L))
Buggy code:
num = int(input())
data = [int(i) for i in input().split()]
print(max(data),min(data),sum(data))

Fixed code:
num = int(input())
data = [int(i) for i in input().split()]
print(min(data),max(data),sum(data))
Buggy code:
n = int(input())
nums = list(map(int, input().split(" ")))

maxnum = -1000000
minnum = 1000000
total = 0

for item in nums:
	if maxnum < item:
		maxnum = item
	elif minnum > item:
		minnum = item
	else:
		
		
for item in nums:
	total += item
	
print(str(minnum) + " " + str(maxnum) + " " + str(total))


Fixed code:
n = int(input())
nums = list(map(int, input().split(" ")))

maxnum = -1000000
minnum = 1000000
total = 0

for item in nums:
	if maxnum < item:
		maxnum = item
	if minnum > item:
		minnum = item
		
for item in nums:
	total += item
	
print(str(minnum) + " " + str(maxnum) + " " + str(total))
Buggy code:
n=int(input())
max=-1000001;min=1000001;g=0;i=0;
num=list()
while i<n:
 num+=map(int,input().split())
 i=i+1
for x in num:
 if max<x:
  max=x
 if min>x:
  min=x
 g+=x
print(min,max,g)


Fixed code:
n=int(input())
max=-1000001;min=1000001;g=0;i=0;
num=list(map(int,input().split()))
for x in num:
 if max<x:
  max=x
 if min>x:
  min=x
 g+=x
 i+=1
print(min,max,g)
Buggy code:
def main():
    nums = list(map(int, input().split()))
    print(min(nums), max(nums), sum(nums))

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()
Buggy code:
n = int(input())
a = map(int, input().split())
print(min(a), max(a), sum(a))

Fixed code:
n = int(input())
a = list(map(int, input().split()))
print(min(a), max(a), sum(a))
Buggy code:

x = list(map(int,input().split()))
x.sort()
print('%s %s %s'%(min(x),max(x),sum(x)))


Fixed code:
n = input()
x = list(map(int,input().split()))
x.sort()
print('%s %s %s'%(min(x),max(x),sum(x)))
Buggy code:
num = int(input())
data = map(int, input().split())

data.sort()

min = data[0]
max = data[-1]
avg = 0

for tmp in data:
	avg += tmp

print(min,max,avg)


Fixed code:
num = int(input())
data = list(map(int, input().split()))

data.sort()

min = data[0]
max = data[-1]
avg = 0

for tmp in data:
        avg += tmp

print(min,max,avg)
Buggy code:
n= int(input())
l= list(map(int,input().split()))
s= 0
for i in range(n-1):
	if(l[i+1]<l[0]):
		l[0],l[i+1]= l[i+1],l[0]
for j in range(n-1):
	if(l[n-1]<l[j]):
		l[n-1],l[j]= l[j],l[n-1]
for k in range(n-1):
	s+= l[i]
print(l[0],l[n-1],s)

Fixed code:
n= int(input())
l= list(map(int,input().split()))
s= 0
for i in range(n):
	if(l[i]<l[0]):
		l[0],l[i]= l[i],l[0]
for j in range(n):
	if(l[n-1]<l[j]):
		l[n-1],l[j]= l[j],l[n-1]
for k in range(n):
	s+= l[k]
print(l[0],l[n-1],s)
Buggy code:
n = int(input())
a = map(int, input().split())
print(min(a), max(a), sum(a))


Fixed code:
n = int(input())
a = list(map(int,input().split()))

print(min(a),max(a),sum(a))
Buggy code:
input()
d = [int(x) for x in input().split()]
print(max(d), min(d), sum(d))

Fixed code:
input()
d = [int(x) for x in input().split()]
print(min(d), max(d), sum(d))
Buggy code:
input()
li = map(int, input().split())
print(min(li), max(li), sum(li))


Fixed code:
input()
li = list(map(int, input().split()))
print(min(li), max(li), sum(li))