qyliang/CodeNanoFix huggingface dataset:
Buggy code:
x = input()
a = x.split()
b = list(map(int,a))
print("{} {} {}".format(min(b),max(b),sum(b)))


Fixed code:
input()
x = input()
a = x.split()
b = list(map(int,a))
print("{} {} {}".format(min(b),max(b),sum(b)))
Buggy code:
n=int(input())
data=list(map(int, input().split()))
print('%d %d %d' % (min(data), max(data), sum(data) )))

Fixed code:
n=int(input())
data=list(map(int, input().split()))
print('%d %d %d' % (min(data), max(data), sum(data) ))
Buggy code:
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
print("{} {} {}".format(max(a), min(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:
n = int(input()
table = list(map(int, input().split()))

data_max = max(table)
data_min = min(table)
data_sum = sum(table)

print(data_min, data_max, data_sum)





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

data_max = max(table)
data_min = min(table)
data_sum = sum(table)

print(data_min, data_max, data_sum)
Buggy code:
input()
n = map(int,input().split())
print(min(n),max(n),sum(n))

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

Fixed code:
input()
a=list(map(int,input().split()))
print (min(a),end=" ")
print (max(a),end=" ")
print (sum(a))
Buggy code:
n = int(input())
lis = list(map(int, input()split(" ")))
big_num = 1000000
max_num, min_num, sum = -1*big_num, big_num, 0
for i in lis:
    if i > max_num:
        max_num = i
    if i < min_num:
        min_num = i
    sum += i
print("%d %d %d" % (min_num, max_num, sum))


Fixed code:
n = int(input())
lis = list(map(int, input().split(" ")))
big_num = 1000000
max_num, min_num, sum = -1*big_num, big_num, 0
for i in lis:
    if i > max_num:
        max_num = i
    if i < min_num:
        min_num = i
    sum += i
print("%d %d %d" % (min_num, max_num, sum))
Buggy code:
input()
A = list(input().split())
print(min(A),max(A),sum([int(i) for i in A]))

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

Fixed code:
first=input()
hantei=list(map(int,input().split()))
print("{0} {1} {2}".format(min(hantei),max(hantei),sum(hantei)))
Buggy code:
length = int(input())
arr = input().split()

iniV = int(arr[0])

mi = iniV
mx = iniV
su = iniV
for s in arr:
    val = int(s)
    su += val
    if(val < mi):
        mi = val
    if(val > mx):
        mx = val

print(mi, mx, su)



Fixed code:
length = int(input())
arr = input().split()

iniV = int(arr[0])

mi = iniV
mx = iniV
su = 0
for s in arr:
    val = int(s)
    su += val
    if(val < mi):
        mi = val
    if(val > mx):
        mx = val

print(mi, mx, su)
Buggy code:
num = int(input())
lis = list(map(int,input().split()))
sum = 0
min = list[0]
max = list[0]
for i in range(num):
    if(min > list[i]):min = list[i]
    if(max < list[i]):max = list[i]
    sum = sum+list[i]
    
print("%d %d %d" %(min,max,sum))


Fixed code:
num = int(input())
lis = list(map(int,input().split()))
sum = 0
min = lis[0]
max = lis[0]
for i in range(num):
    if(min > lis[i]):min = lis[i]
    if(max < lis[i]):max = lis[i]
    sum = sum+lis[i]
    
print("%d %d %d" %(min,max,sum))
Buggy code:
n = int(input())
a = list(map(int, input().split()))
sum = 0
min = a[0]
max = a[0]
for i in range(1, n):
  if a[i] < min:
    min = a[i]
  if a[i] > max:
    max = a[i]
  sum += a[i]
print(min, max, sum)
  

Fixed code:
n = int(input())
a = list(map(int, input().split()))
sum = a[0]
min = a[0]
max = a[0]
for i in range(1, n):
  if a[i] < min:
    min = a[i]
  if a[i] > max:
    max = a[i]
  sum += a[i]
print(min, max, sum)
Buggy code:
FirstLine = input()
myList  = list([int(i) for i in input().split()])
print(min(A),max(A),sum(A))


Fixed code:
FirstLine = input()
myList  = list([int(i) for i in input().split()])
print(min(myList),max(myList ),sum(myList ))
Buggy code:
input()
data = [int(i) for i in input().split()]
print(min(data), max(data), sum(data))
~                                      

Fixed code:
input()
data = [int(i) for i in input().split()]
print(min(data), max(data), sum(data))
Buggy code:
a=[]
for i in range(2):
    m=input().split()
    a.append(m)

list_1=[int(l) for l in a[0]]
list_2=[int(l) for l in a[1]]
total=0
largest=list_2[0]
smallest=list_2[0]


for x in range(list_1[0]):
    if largest<list_2[x]:
        largest=list_2[x]
    if smallest>list_2[x]:
        smallest=list_2[x]

for x in list_2:
    total+=x

print(largest,smallest,total)

Fixed code:
a=[]
for i in range(2):
    m=input().split()
    a.append(m)

list_1=[int(l) for l in a[0]]
list_2=[int(l) for l in a[1]]
total=0
largest=list_2[0]
smallest=list_2[0]


for x in range(list_1[0]):
    if largest<list_2[x]:
        largest=list_2[x]
    if smallest>list_2[x]:
        smallest=list_2[x]

for x in list_2:
    total+=x

print(smallest,largest,total)
Buggy code:
n = input()
s = 0
a = input()
b = a.split(" ")
c = []
for i in range(n):
    c.append(int(b[i]))

for u in c:
    s=s+u

print(min(c),max(c),s)


Fixed code:
n = input()
s = 0
a = input()
b = a.split(" ")
c = []
for i in range(int(n)):
    c.append(int(b[i]))

for u in c:
    s=s+u

print(min(c),max(c),s)
Buggy code:
# coding : utf-8
'''
????°????????????§??????????¨????
'''
a = int(input())
n1 = input().split()
n1 = [float(i) for i in n1]
print(min(n1), max(n1), sum(n1))

Fixed code:
# coding : utf-8
'''
????°????????????§??????????¨????
'''
a = int(input())
n1 = input().split()
n1 = [int(i) for i in n1]
print(min(n1), max(n1), sum(n1))
Buggy code:
n = int(input())
A = list(map(int,input().split()))
print(max(A), min(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()
l.sort()
sum = 0
for i in range(n):
    sum = sum+int(l[i])
print(l[0],l[-1],sum)


Fixed code:
n = int(input())
l = list(map(int, input().split()))
l.sort()
sum = 0
for i in range(n):
    sum = sum+int(l[i])
print(l[0],l[-1],sum)
Buggy code:
n = int(input())
l = input().split()
mini = min(l)
maxi = max(l)
sums = 0

for i in range(0,n):
    sums = sums + int(l[i])
    
print(f"{mini} {maxi} {sums}")


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

mini = min(l)
maxi = max(l)
sums = 0

for i in range(0,n):
    sums = sums + int(l[i])
    
print(f"{mini} {maxi} {sums}")
Buggy code:
input()
s=[int(i) for i in input().split]
print(min(s),max(s),sum(s))

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

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

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

sum = 0

for x in a:
    sum += x

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


Fixed code:
input()

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

sum = 0

for x in a:
    sum += x

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

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

s = 0

for i in len(a):
    s = s + i

print(min(a), max(a), s)


Fixed code:
input()

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

s = 0

for i in a:
    s = s + i

print(min(a), max(a), s)
Buggy code:
nums = list(map(int, input().split()))
print("{0} {1} {2}".format(min(nums), max(nums), sum(nums)))

Fixed code:
num = input()
nums = list(map(int, input().split()))
print("{0} {1} {2}".format(min(nums), max(nums), sum(nums)))
Buggy code:
n = int(input())
ai = [int(x) for x in input().split()]
min = ai[0]
max = ai[0]
total = 0
for x in ai:
    total += x
    if x < min:
        min = x
    if x > max:
        max = x



Fixed code:
n = int(input())
ai = [int(x) for x in input().split()]
min = ai[0]
max = ai[0]
total = 0
for x in ai:
    total += x
    if x < min:
        min = x
    if x > max:
        max = x
print(min, max, total)
Buggy code:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()

Fixed code:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    n = sys.stdin.readline()
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()
Buggy code:
input()
li=list(map(int,input().split()))
for i in li:
	sum+=i
print(min(li),max(li),sum)


Fixed code:
input()
li=list(map(int,input().split()))
sum=0
for i in li:
	sum+=i
print(min(li),max(li),sum)
Buggy code:
input()

input()
  
data = [int(x) for x in input().split()]
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:
input()
b=[int(a) for a in input().split()]
print(min(b),max(b),sum(b)')

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

Fixed code:
input()
num = [int(i) for i in input().split()]
print (min(num),max(num),sum(num))
Buggy code:
import math
def solve(numbers):
    print('s')
    min, max, sum=numbers[0],numbers[0],0
    
    for number in numbers:
        if min > number:
            min = number
        if max < number:
            max = number
        sum+=number
    print('{0} {1} {2}'.format(min,max,sum))
        
    
def answer():
    case = int(input())

    
    numbers = list(map(int,input().split()))
    solve(numbers)


if __name__ =='__main__':
    answer()


Fixed code:
import math
def solve(numbers):
    min, max, sum=numbers[0],numbers[0],0
    
    for number in numbers:
        if min > number:
            min = number
        if max < number:
            max = number
        sum+=number
    print('{0} {1} {2}'.format(min,max,sum))
        
    
def answer():
    case = int(input())

    
    numbers = list(map(int,input().split()))
    solve(numbers)


if __name__ =='__main__':
    answer()
Buggy code:
sum = 0
max = -10000000
min = 10000000

input()

for i in [int(x) for x in input().split()]:
    sum += i
    if i > max:
        max = i

    if i > min:
        min = i

print(min,max,sum)

Fixed code:
sum = 0
max = -10000000
min = 10000000

input()

for i in [int(x) for x in input().split()]:
    sum += i
    if i > max:
        max = i

    if i < min:
        min = i

print(min,max,sum)
Buggy code:
n = int(input())
a = list(map(int,input().split()))
a.sort()
ans = 0
for i in range(len(a)):
	ans += a[i]
print("%d %d %d" % a[0],a[len(a)-1],ans)


Fixed code:
n = int(input())
a = list(map(int,input().split()))
a.sort()
ans = 0
for i in range(len(a)):
	ans += a[i]
print("%d %d %d" % (a[0],a[len(a)-1],ans))
Buggy code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d %d' % (min(a), max(a), sum(a)))

if __name__ == "__main__":
    main()


Fixed code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    n = int(input())
    a = numinput()
    print('%d %d %d' % (min(a), max(a), sum(a)))

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


Fixed code:
input()
n=list(map(int, input().split()))
print(min(n), max(n), sum(n))
Buggy code:
#coding:utf-8
#1_4_D 2015.3.29
n = input()
data = list(map(int,input().split()))
print((min(data),max(data),sum(data)))

Fixed code:
#coding:utf-8
#1_4_D 2015.3.29
n = input()
data = list(map(int,input().split()))
print(min(data),max(data),sum(data))
Buggy code:
input()
nums = [ int(i) for i in input().split()]

print( min(mums), max(nums), sum(nums))

Fixed code:
input()
nums = [ int(i) for i in input().split()]
 
print( min(nums), max(nums), sum(nums))
Buggy code:
'''
ITP-1_4-D
 ????°????????????§??????????¨????
n????????´??° ai(i=1,2,...n)ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????
???Input
??????????????´??°?????° nn ???????????????????????????????????? nn ????????´??° aiai ????????????????????§?????????????????????
???Output
????°????????????§??????????¨????????????????????????§????????????????????????????????????
'''
# import
import sys

# ?????°??????????????????
int(input())
inputData = map(int, input().split())
maxData = 0
minData = -1
totalData = 0

for inputVal in inputData:

    # max value check
    if inputVal > maxData:
        maxData = inputVal

    # minimum value check
    if inputVal < minData:
        minData = inputVal

    # total value add
    totalData += inputVal

# ????????????
print(minData, maxData, totalData)

Fixed code:
'''
ITP-1_4-D
 ????°????????????§??????????¨????
n????????´??° ai(i=1,2,...n)ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????
???Input
??????????????´??°?????° nn ???????????????????????????????????? nn ????????´??° aiai ????????????????????§?????????????????????
???Output
????°????????????§??????????¨????????????????????????§????????????????????????????????????
'''
# import
import sys

# ?????°??????????????????
n = int(input())
inputData = map(int, input().split())
maxData = -1000000
minData = 1000000
totalData = 0

for inputVal in inputData:

    # max value check
    if inputVal > maxData:
        maxData = inputVal

    # minimum value check
    if inputVal < minData:
        minData = inputVal

    # total value add
    totalData += inputVal

# ????????????
print(minData, maxData, totalData)
Buggy code:
def main():

    n = int(input())
    numbers = list(map(int, input().split()))
    ans1 = max(numbers)
    ans2 = min(numbers)
    ans3 = sum(numbers)
    print(ans1, ans2, ans3)






if __name__=="__main__":
    main()

Fixed code:
def main():

    n = int(input())
    numbers = list(map(int, input().split()))
    ans1 = min(numbers)
    ans2 = max(numbers)
    ans3 = sum(numbers)
    print(ans1, ans2, ans3)






if __name__=="__main__":
    main()
Buggy code:
while True:
       (H, W) = [int(x) for x in input().split()]
       if H == W == 0:
            break

    
       for hc in range(H):
             for wc in range(W):
                  print('#',end=' ')

             print()

      print()

Fixed code:
while True:
     (H, W) = [int(x) for x in input().split()]
     if H == W == 0:
         break
   
     for hc in range(H):
         for wc in range(W):
             print('#', end='')
      
         print()
      
     print()
Buggy code:
while(True):
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    line = ''
    for i in range(W):
        line += '#'
    for i in range(H):
        print(line)

Fixed code:
while(True):
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    line = ''
    for i in range(W):
        line += '#'
    for i in range(H):
        print(line)
    print()
Buggy code:
while True:
    H, W = map(int, input().split())
    if H == W == 0:
        break
    for i in range(H):
        print('#' * W)



Fixed code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print("#"*W)
    print()
Buggy code:
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:break
    for i in range(a):
    	print("#"*b)
print()


Fixed code:
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    else:
        for i in range(a):
            print('#'*b)
    print('')
Buggy code:
while True:
    H,W = map(int, input().split())
    if H == 0 and W == 0:
        break
    a = "#" * W
    for i in range(H):
        print(a)

Fixed code:
while True:
	H, W = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print("#" * W)
	print()
Buggy code:
while True:
    H,W = map(int,input().split())
    if H == W == 0:
        break
    for i in range(H):
        print(#*W)
        
    print()


Fixed code:
while True:
    H,W = map(int,input().split())
    if H == W == 0:
        break
    for i in range(H):
        print("#"*W)
        
    print()
Buggy code:
while True:
    a = list(map(lambda x : int(x), input().split(" ")))
    if a[0] == 0 and a[1] == 0:
        break
    for i in range(a[0]):
        for j in range(a[1]):
            print("#", end="")
        print()

Fixed code:
while True:
    a = list(map(lambda x : int(x), input().split(" ")))
    if a[0] == 0 and a[1] == 0:
        break
    for i in range(a[0]):
        for j in range(a[1]):
            print("#", end="")
        print()
    print()
Buggy code:
while True :
    H, W = map(int, input().split())
    if H == W == 0 :
        break
    else:
        for H in range(H) :
            print("#" * W)

Fixed code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    else:
        for i in range(H):
            print('#'*W)
    print('')
Buggy code:
while True:
    H,W = map(int,input().split())
    if H==0:
        break
    for i in range(H):
        for j in range(W):
            print("#",end="")
        print("")

Fixed code:
while True:
    H,W=map(int,input().split())
    if H==0 and W==0:
        break
    for i in range (H):
        for j in range (W):
            print('#',end='')
        print()
    print()
Buggy code:
import sys

for v in iter(sys.stdin.readline,''):
    h,w = map(int,v.split())

    if h == 0 and w == 0:
        break

    for i in range(h+1):
        print('#'*w)
    print('')

Fixed code:
import sys

for v in iter(sys.stdin.readline,''):
    h,w = map(int,v.split())

    if h == 0 and w == 0:
        break

    for i in range(h):
        print('#'*w)
    print('')
Buggy code:
while True:
  WH = input().split()
  if WH[0] == '0': break
  for i in range(int(WH[1])):
    print('#'*int(WH[0]))
  print()

Fixed code:
while True:
  WH = input().split()
  if WH[0] == '0': break
  for i in range(int(WH[0])):
    print('#'*int(WH[1]))
  print()
Buggy code:
while True:
    (H,W) = [int(x) for x in input().split()]
    if H == W == 0:
        break

    for hc in range(H):
        for wc in range(W):
        print('#', end= '')

    print()

print()

Fixed code:
while True:
    (H,W) = [int(x) for x in input().split()]
    if H == W == 0:
        break

    for hc in range(H):
        for wc in range(W):
            print('#', end= '')

        print()

    print()
Buggy code:
while True:
    H, W =[int(i) for i in input().split()]
    if H == W == 0:
        break

    for h in range(H):
        for h in range(W):
            print('w', end='')
        
        print()

    print()

Fixed code:
while True:
    H, W =[int(i) for i in input().split()]
    if H == W == 0:
        break

    for h in range(H):
        for w in range(W):
            print('#', end='')
        
        print()

    print()
Buggy code:
while True:
    w, h = map(int, input().split())
    if w+h == 0:
        break
    line = "#"*w
    for y in range(h):
        print(line)
    print()



Fixed code:
while True:
    h, w = map(int, input().split())
    if w+h == 0:
        break
    line = "#"*w
    for y in range(h):
        print(line)
    print()
Buggy code:
while True:
    row, col = map(int,input().split(" "))
    if row == 0 and col == 0:
        break
    for i in range(row):
        print("#" * col)


Fixed code:
while True:
    row, col = map(int,input().split(" "))
    if row == 0 and col == 0:
        break
    for i in range(row):
        print("#" * col)
    print()
Buggy code:

while 1:
	arr = list(map(int, input().split()))
	H = arr[0]
	W = arr[1]
	
	if H == 0 and W == 0:
		break

	line = ''
	for i in range(W):
		line += '#'
	
	for i in range(W):
		print(line)

	print('')



Fixed code:

while 1:
	arr = list(map(int, input().split()))
	H = arr[0]
	W = arr[1]
	
	if H == 0 and W == 0:
		break

	line = ''
	for i in range(W):
		line += '#'
	
	for i in range(H):
		print(line)

	print('')
Buggy code:
while 1:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        for j in range(W):
            print("#", end = '')
        print()


Fixed code:
while True:
 H,W=map(int,input().split())
 if H==0 and W==0:
  break
 for j in range(H):
  for i in range(W):
    print("#", end="")
  print()
 print()
Buggy code:
while True:
  H, W = map(int, input().split())
  if H == 0 and W == 0:
    break
  for j in range(H):
    for i in range(W):
        print("#", end=" ")
    print()


Fixed code:
while True:
    H,W = map(int,input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        for j in range(W):
            print("#", end="")
        print()
    print()
Buggy code:
while True:
    a = input()
    b = a.split(' ')
    H = int(b[0])
    W = int(b[1])
    if H == 0 and W ==0:
        break
    for i in range(H):
        c = '#'*W
        print(c)
        print()

Fixed code:
while True:
    a = input()
    b = a.split(' ')
    H = int(b[0])
    W = int(b[1])
    if H == 0 and W ==0:
        break
    for i in range(H):
        c = '#'*W
        print(c)
    print()
Buggy code:
while True:
    w, h = [int(i) for i in input().split()]
    if w == h == 0:
        break
    print(("#" * w + "\n")*h)



Fixed code:
while True:
    h, w = [int(i) for i in input().split()]
    if w == h == 0:
        break
    print(("#" * w + "\n")*h)
Buggy code:
while 1:
    H, W = list(map(int, input().split()))
    if H == W == 0:
        break
    for i in range(H):
        print('#' * W)

Fixed code:
while 1:
    H, W = list(map(int, input().split()))
    if H == W == 0:
        break
    for i in range(H):
        print('#' * W)
    print()
Buggy code:
while True:
    H, W = map(int, input().split())
    if H + W == 0:
        break
    for i in range(H):
        print("*" * W)
    print()

Fixed code:
while True:
    H, W = map(int, input().split())
    if H + W == 0:
        break
    for i in range(H):
        print("#" * W)
    print()
Buggy code:
while True:
	h,w = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print("#" * w)
	print("\n")

Fixed code:


while True:
    h,w =map(int,input().split())
    if h == 0 and w == 0:
        break
    for i in range(h):
        print(w*'#')
    print()
Buggy code:
while True:
    W,H = map(int, input().split())
    if W == H == 0:
        break;
    L="#"*W
    for i in range(H):
        print(L)
    print("")

Fixed code:
while True:
    H,W = map(int, input().split())
    if W == H == 0:
        break;
    L="#"*W
    for i in range(H):
        print(L)
    print("")
Buggy code:
if __name__ == "__main__":
	lis = []
	while True:
		a, b = map( int, input().split() )
		if a == b == 0:
			break
		lis.append([a,b])
	for i in lis:
		for j in range(i[0]):
			print('#'*i[1])

Fixed code:
if __name__ == "__main__":
	lis = []
	while True:
		a, b = map( int, input().split() )
		if a == b == 0:
			break
		lis.append([a,b])
	for i in lis:
		for j in range(i[0]):
			print('#'*i[1])
		print()
Buggy code:
while True:
    h, w = list(map(int, input().split()))
    if h == w == 0:
        break
    print(('#' * w + '\n') * h)
    print('\n')

Fixed code:
while True:
    h, w = list(map(int, input().split()))
    if h == w == 0:
        break
    print(('#' * w + '\n') * h)
Buggy code:
while 1:
    H,W=[int(i) for i in input().split()]
    if H==W==0:
        break
    else:
        for i in range(H):
            for s in range (W):
                print("#",end="")
            print('\n')
        print('\n')

Fixed code:
while 1:
    H,W=[int(i) for i in input().split()]
    if H==W==0:
        break
    else:
        for i in range(H):
            for s in range (W):
                print("#",end="")
            print('')
        print('')