fork download
  1. #!/usr/bin/perl
  2. use bignum;
  3. for $N (3,5,7) {
  4. Math::BigFloat->accuracy(1000 * $N);
  5. printf "N = $N => %d\n",
  6. scalar grep{/0/} split'', sqrt($N);
  7. }
Success #stdin #stdout 3.19s 25328KB
stdin
Standard input is empty
stdout
N = 3 => 309
N = 5 => 493
N = 7 => 738