array = []
_bool=1
while _bool==1:
while 1:
try:
line = list(map(int, input().split()))
except:
_bool=0
break
array.append(line)
row = array[0][0]
col = array[0][1]
if(len(array)==row+1):
break
line = []
for i in range(col):
for j in range(1, row+1):
print(array[j][i], end = " " if j==row-1 else "")
print("\n")
送出程式碼得到
正解為3
但我印出3 8
謝謝