Lucky tickets

Back to General discussions forum

Suman Dutta     2020-06-12 05:36:18

Is there any easy method to calculate lucky tickets? I have coded this but if N is large or B is large it's taking too much time to give result...can anyone help me provide a easy sol to calculate.

sontran     2020-06-12 06:21:54

Hint: 1. Brute force a couple of results. 2. Use OEIS.

edit: also seperate odd and even cases

Please login and solve 5 problems to be able to post at forum