diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-05-14 19:51:41 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-05-14 19:51:41 -0500 |
commit | c3ff98ee4aa79bcaa07c8a478e96539c2a512e73 (patch) | |
tree | 0b1a04ee7e5b05ec23dcfa274d4258f8acbcdf9d /003.pl | |
parent | 394121b98178246a0b1063e9104f8878cf2a17e5 (diff) | |
download | projecteuler-c3ff98ee4aa79bcaa07c8a478e96539c2a512e73.tar.gz projecteuler-c3ff98ee4aa79bcaa07c8a478e96539c2a512e73.zip |
rename files for better sorting
Diffstat (limited to '003.pl')
-rwxr-xr-x | 003.pl | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#!/usr/bin/perl +use strict; +use warnings; + +my $num = 317584931803; +my $test = 3; +while (1) { + if ($num % $test) { + $test += 2; + } + else { + $num /= $test; + } + last if $test > sqrt $num; +} +print "$num\n"; |