if __name__=='__main__':
input1 = input()
input2 = input()
len,off = input1.split(' ')
len = int(len)
off = int(off)%len
lst = [int(i) for i in input2.split(' ')]
tmp = lst[-off:]
res = tmp+lst[:-off]
for index,item in enumerate(res):
if index == len-1:
print(item)
break
print(item,end = ' ')
exit(0)
你先确定一下是不是环境的问题。
请问解决了吗?我也遇到了这个问题,然后我对照别人的代码,将input.split(" ")改成了input.split(),然后不是显示非0返回,且正确了。