Petr and a Combination Lock

Problem Name:
Petr and a Combination Lock
Site:CodeForces
Links:
Tags:
Problem setters: