Skip to content

Instantly share code, notes, and snippets.

@djacobs
Created November 4, 2011 17:05
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 djacobs/1339858 to your computer and use it in GitHub Desktop.
Save djacobs/1339858 to your computer and use it in GitHub Desktop.
use strict;
use POSIX;
use bignum;
use constant DEBUG => 0;
my $count = 0;
my $x = 2 ** 1043;
my @s = split(//,$x."a");
DEBUG and print $x, "\n";
while (!($s[0] eq 'a'))
{
$count += shift(@s);
DEBUG and print "☃";
}
print $count, "\n";
@nataliepo
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment