UVA10026 Shoemaker's Problem

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=967 [PDF](https://uva.onlinejudge.org/external/100/p10026.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10026/c2c5e2a4f9a13f35effb66d8c60edb1ad87b5c99.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10026/009fbb3de72751fda02e0d615fc281b47ddd877e.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10026/b90271d1d27712d90286ac7ce8fd524d9c92fb69.png)