UVA628 Passwords

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=569 [PDF](https://uva.onlinejudge.org/external/6/p628.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA628/7cb2a1f39941c41ef5b98b8f0887bfa9e8d3fe94.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA628/0992a16a01d91675c7867fe9937ede5194b35bbb.png)