UVA11113 Continuous Fractions

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=23&page=show_problem&problem=2054 [PDF](https://uva.onlinejudge.org/external/111/p11113.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11113/9981f0306f196a93dd8d455133c1e92ab0bba84a.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11113/2802addb016b15cd7c6316b12f8e2e676b209ce4.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11113/83b38aa7a7ea7c4540c65a1141c758c9c6610b09.png)