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.
You have to actually consider those numbers only which gives only 3 prime numbers if arranged as per the input conditions. Like if you are considering (11,13,17) by fixing 1 and replacing 2nd digit with some number will also give 19 as prime number. So it will be considered for L as 4 but the input is 3.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #51: Prime digit replacements
You are viewing a single comment's thread. Return to all comments →
You have to actually consider those numbers only which gives only 3 prime numbers if arranged as per the input conditions. Like if you are considering (11,13,17) by fixing 1 and replacing 2nd digit with some number will also give 19 as prime number. So it will be considered for L as 4 but the input is 3.