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.
I am having trouble solving this problem. The approach I came up with for finding f is calculating the total possible permutations of the numbers 0 through (c-1) and then subtracting all the permutations that do not meet the criteria (over n zeros/m consecutive ones).
Am I on the right track or is there a better way to go about it? Also, are there any concepts that I could study that would help me solve this problem?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #191: Prize Strings
You are viewing a single comment's thread. Return to all comments →
I am having trouble solving this problem. The approach I came up with for finding f is calculating the total possible permutations of the numbers 0 through (c-1) and then subtracting all the permutations that do not meet the criteria (over n zeros/m consecutive ones).
Am I on the right track or is there a better way to go about it? Also, are there any concepts that I could study that would help me solve this problem?