We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
HINT: use a recurrence based on the last 4 digits of the number. In order to compute the number of solutions of length n ending in ABCD, you can get it based on the number of solutions through Apps Like MeetMe of length n-1 ending in XABC, for each X = 0 to 9.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Prime Digit Sums
You are viewing a single comment's thread. Return to all comments →
HINT: use a recurrence based on the last 4 digits of the number. In order to compute the number of solutions of length n ending in ABCD, you can get it based on the number of solutions through Apps Like MeetMe of length n-1 ending in XABC, for each X = 0 to 9.