MAT

Riddle #4

Find the largest of the prime factors of N.

Vincoli

10 < N < 108

Example

N = 957 is divisible in the following prime factors:

3, 11, 29

The greatest is: 29

Your program

<?php
    
function main($N) {

  $return = 0;
  /* Write your function here */
  
  return $return;
}
  
$IN = (array) json_decode(base64_decode($argv[1]));
extract($IN);
echo main($N);
?>

Your input

{ 
  "N": 957 
}

Your output

-

Correct output

29

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