UVA769 Magic of David Copperfield

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=710 [PDF](https://uva.onlinejudge.org/external/7/p769.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA769/216984707196a3be3caa0e45632b9097446b51cb.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA769/5db3806067ee282040c32ebba26cbbf5dc3a3d11.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA769/8e7a27bd5963ebba44772354ba5c7346ec02880d.png)