Number of Lucky Numbers less than N
Anonymous User
383

A number is lucky number if it contains only digits <5 and all are in non-decreasing order. Find number of such lucky numbers till given N.
N can be upto 10^18

My approach is to simply follow digit dp

Can someone please verify this logic.

Comments (0)