UVA12910 Snakes and Ladders

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4775 [PDF](https://uva.onlinejudge.org/external/129/p12910.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12910/a7583afc71d1b85f9f23ff4d74575cff8d473ff1.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12910/58dcd21e6b4283759c0eef27569f31d8910e3687.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12910/774b0a3e541dbc8b7209963a5ed990a8b0d2bdd8.png)