Skip to content

Instantly share code, notes, and snippets.

@vnaskos
Created February 28, 2017 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vnaskos/385eb16d4ac366cde96a1670a271fdff to your computer and use it in GitHub Desktop.
Save vnaskos/385eb16d4ac366cde96a1670a271fdff to your computer and use it in GitHub Desktop.
Learn Perl - Project Euler P48
#!/usr/bin/perl
use strict;
use warnings;
use Math::BigInt;
my $result = Math::BigInt->new(0);
$result->badd(Math::BigInt->new($_)->bpow($_)) for (1 .. 1000);
print(substr("$result", -10),"\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment