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.
Solved in Python 3, time limit exceeded
Solved in Javascript, memory exceeded
Solved in javascript generating primes upto 999999 and then checking primes upto sqrt(n) in isprime() , testcase 14 failed.
What to do?
Edit: My bad, I forgot to replace "br" tag with "\n" for K=5
Same logic failed 3 test cases it python due to TLE and Javascript passed really fast. Weird
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #60: Prime pair sets
You are viewing a single comment's thread. Return to all comments →
Solved in Python 3, time limit exceeded
Solved in Javascript, memory exceeded
Solved in javascript generating primes upto 999999 and then checking primes upto sqrt(n) in isprime() , testcase 14 failed.
What to do?
Edit: My bad, I forgot to replace "br" tag with "\n" for K=5
Same logic failed 3 test cases it python due to TLE and Javascript passed really fast. Weird