UVA13217 Amazing Function

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5140 [PDF](https://uva.onlinejudge.org/external/132/p13217.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13217/a70f7eebf60cd6342b0070eff7e2800984ed766f.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13217/7fb91a9d283ed49239d643239c5dd97b60449044.png)

Output Format

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