summaryrefslogtreecommitdiffstats
path: root/003.pl
diff options
context:
space:
mode:
Diffstat (limited to '003.pl')
-rwxr-xr-x003.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/003.pl b/003.pl
new file mode 100755
index 0000000..7fbf7ad
--- /dev/null
+++ b/003.pl
@@ -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";