没有提交,试了两个例子还行,大家看看有问题没 #adj_list=[0,1,1,1,2,1,2,3,1] #adj_list=[0,3,5,0,4,9,0,6,8,0,7,5,1,2,6,1,6,3,2,9,7,3,4,3,3,5,3,3,8,3,3,9,3,5,8,3,5,8,9,7,8,9] adj_list=[0,3,5,0,4,9,0,6,8,0,7,5,1,2,6,1,6,3,2,9,7,3,4,3,3,5,3,3,8,3,3,9,3,5,8,9,7,8,9] def print_for(user_list): for i in user_list: ...