UVA12453 Simulating Billiard Ball

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=279&page=show_problem&problem=3884 [PDF](https://uva.onlinejudge.org/external/124/p12453.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12453/d42e248dcf31983473535a76ada6744cca212caa.png)

Input Format

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

Output Format

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