UVA11653 Stick Makes Gold

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2700 [PDF](https://uva.onlinejudge.org/external/116/p11653.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11653/c1a7300f7b226cfe24e95d6860318192bc7a96aa.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11653/1a87df64a8d398dfcc2ff65378b89815ac48e97f.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11653/01a1d6eed0af4c57eca9e47d6708057f77882a9e.png)