Demo entry 5993295

sushu

   

Submitted by aipeng on Sep 13, 2016 at 11:05
Language: Perl. Code size: 193 Bytes.

sub function ()
{
  my $x = shift;
  if ($x <= 1)
  {
	   return 0;
  }

  my $f = int(sqrt(x))
  for my $i (2 .. f)
  {
    if ($x % $i == 0)
    {
return 0;
}
}
return 1;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).