哪个大佬帮我看看哪里错了为啥会RE

P1319 压缩技术

Bbbbing @ 2024-05-26 16:34:24

ls=list(map(eval,input().split(' ')))

n=ls[0]

ls2=[]

for i in range(1,len(ls)):

if i%2==1:

    ls2.append('0'*ls[i])

if i%2==0:

    ls2.append('1'*ls[i])

z=''.join(ls2)

for j in range(1,n+1):

print(z[0:n:])

z=z[n::]

|