問題
ERROR: The request could not be satisfied

方針
蛇腹のようにリストを打ち出していく。

リストをカッコなしでprintするには、アスタリスクをつければ良い。
a = [1, 2, 3]
print(*a)
またリストを逆さまに打ち出すには以下のようにする。
print(a[::-1])
提出コード
#input
h, w = map(int, input().split())
n = int(input())
a = list(map(int, input().split()))
#output
import numpy as np
b = [i+1 for i in range(n)]
c = np.repeat(b, a)
d = np.array_split(c, h)
for i in range(h):
if i % 2 == 0:
print(*d[i])
else:
print(*d[i][::-1])
提示結果
ERROR: The request could not be satisfied
コメント