题解 | 神秘石像的镜像序列
神秘石像的镜像序列
https://www.nowcoder.com/practice/fa34eea974234610b6d3d81790cb2949
input_str = input()
# 分割字符串得到数字列表
numbers = input_str.split()
# 移除列表中的所有 '0'
numbers = [x for x in numbers if x != '0']
# 转换为整数列表
numbers = list(map(int, numbers))
# 反转列表并打印
print(' '.join(map(str, numbers[::-1])))
