⌨️

[AtCoder]ABC-237|B - Matrix Transposition

2023/06/01に公開

設問ページ

提出結果

def getIntMap():
    return map(int, input().split())


def getIntListRow(N):
    return [list(map(int, input().split())) for _ in range(N)]

def main():
    h, w = getIntMap()
    a = getIntListRow(h)

    for x in range(w):
        print(' '.join([str(a[y][x]) for y in range(h)]))

if __name__ == "__main__":
    main()

Discussion