Hello @utkarsh1729 ,

To solve the q3 , we need to find something interesting here , i.e

The number of passwords starting with 2 and having length k is equal to number of passwords starting with 4 and having length k is equal to the number of passwords starting with 6 and having length k is equal to the number of passwords starting with 8 and having length k

The number of passwords starting with 1 and having length k is equal to number of passwords starting with 3 and having length k is equal to the number of passwords starting with 7 and having length k is equal to the number of passwords starting with 9 and having length k

Having this , you can continue to get the answer

Hope you understood