MathDB
7-digit code by slide of finger - Portugal OPM 2016 p1

Source:

May 15, 2024
number theory

Problem Statement

To unlock his cell phone, Joao slides his finger horizontally or vertically across a numerical box, similar to the one represented in the figure, describing a 77-digit code, without ever passing through the same digit twice. For example, to indicate the code 14523691452369, Joao follows the path indicated in the figure. https://cdn.artofproblemsolving.com/attachments/8/a/511018ba4e43c2c6f0be350d57161eb5ea7c2b.png João forgot his code, but he remembers that it is divisible by 99. How many codes are there under these conditions?