How is the solution 2592?

My solution is failing for this test case.

# Wrong test case answer

I had this issue in my logic, too.

The only possible answers begin with 2 or 3 so there are 2 * 6^4 = 2592 solutions, 6 being the size of A.

Same I also got stuck here.

I want to know is my understanding wrong.

less than 4, count=2 so for first index the answer is 2*6^4=2592
less than 2, count=0 so here it is 0
less than 9, count=5 so for 3rd index the answer is 5*6^2=180

less than 5, count=2 so for 4th index the answer is 2*6=12

less than 0, count=0 so here it is 0

So the total numbers can be formed by this 2592+180+12=2784

Please tell me if my understanding is wrong.