UVA13049 Combination Lock

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=866&page=show_problem&problem=4947 [PDF](https://uva.onlinejudge.org/external/130/p13049.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13049/d9e46c8885b945b356193cc1871d2a785a50ab9a.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13049/3b6fd00a0843fd5bf4ea7f01298c3773e5051c62.png)

Output Format

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