Ad
  • Default User Avatar

    the basic approach i can think of is to iterate over that given range (a, b) and check if two first numbers are primes and evaluate the other conditions but using a for loop just cause 'execution time out' it should be a way to reduce this but i think is related to some numerical theory terms

  • Custom User Avatar

    This means you need a better algorithm, yours is too slow. (Or you have an infinite loop somewhere)