这是一个整体输入的示例。此示例中有4个。
_
| | _
| | _ | |
| | | | | | _
_| |_| |___| |____| |_
第一个整体为4个单元,第二个为2,第三个为3,最后一个为1。
任务
您的程序应按从左到右的顺序输出整体的高度。输出格式可以是任何类型的列表或数组。
笔记
- 输入可以视为任何维字符串,字符串列表或字符列表。
- 这是代码高尔夫球,因此最低字节获胜。
- 您应假定整料始终具有相同的宽度,并且彼此之间的
_
距离始终至少为1 。 - 它们可以以任何高度,任何数量出现。
输入输出
_
| | _
| | _ | |
| | | | | | _
_| |_| |___| |____| |_ >> [4,2,3,1]
_
| |
_ | |
| | _ | | _
_| |_| |__| |_| |_ >> [2,1,4,1]
_ _ _
| |_| |_| |_____ >> [1,1,1]
____________________ >> undefined behavior
_
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | >> [11]
_ _ _ _ _
_ | | _ | | _ | | _ | | _ | |
| |_| |_| |_| |_| |_| |_| |_| |_| |_| | >> [1,2,1,2,1,2,1,2,1,2]
[10]
巨石不是[11]
吗?