UVA273 Jack Straws

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=209 [PDF](https://uva.onlinejudge.org/external/2/p273.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA273/1897b6b223910448b0578df92b8d4d52f3992f09.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA273/3c97b9634f2f4cc8e813f9c3d152312c429428a2.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA273/767ab30ebb610494ab10de0c1221f0d4953e3f90.png)