For making things easier and more understandable we can just implement the process and check if there will be a day where we will open the lock. On the odd days the first lock is applied and on the even days the second one, it is just easy too loop over all the codes starting from 0 and check for the corresponding lock, if we can open a lock at some point then the answer "YES".
No comments:
Post a Comment