MAT

Riddle #8

Find the Nth prime number

Constraints

1 < N < 104

Example

The first primes are:

2, 3, 5, 7, 11, 13, 17,…

The sixth (N = 6) prime number is: 17

Your program

<?php
    
function main($N) {

  $return = 0;
  /* Scrivi la tua funzione qui */
  
  return $return;
}
  
$IN = (array) json_decode(base64_decode($argv[1]));
extract($IN);
echo main($N);
?>

Your input

{ 
  "N": 7 
}

Your output

-

Correct output

29

0 0 votes
Article Rating
Notifiche
Notificami
0 Comments
Inline Feedbacks
View all comments