UVA249 Bang the Drum Slowly

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=185 [PDF](https://uva.onlinejudge.org/external/2/p249.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA249/2344d2e9a31ae2e7c817cdd76ade4ccfb3e06686.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA249/4ae8e8b5e92f495a2e847b3cd6fb9a25b827cacc.png)

Output Format

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