016.pl (180B)
1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 use bignum; 6 use List::Util qw(sum); 7 8 my $n = 2 ** 1000; 9 my $string = "$n"; 10 my $sum = sum(map(int, split('', $string))); 11 12 print "$sum\n";
challengesmy solutions to various "programming challenge" problems | |
| git clone https://wehaveforgeathome.hates.computer/challenges.git | |
| Log | Files | Refs | LICENSE |