UVA12788 Smooth Factor

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4653 [PDF](https://uva.onlinejudge.org/external/127/p12788.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12788/1f75810c8f5282d89ab0544ed20da5d6d5513a05.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12788/4586942d39506e028b5d18da8619c5c847a68d29.png)