Configured
with:
../src/configure
-v
--with-pkgversion=Debian 4.9.2-10
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
$_ = 'Drink coffee! Supported by Six Apart'; | |
tr/a-z/Blogging after this event!/; | |
tr/N-ZA-z/A-za-m/; | |
@m = split //, $_; | |
$j = sub { join(chr(0), @_) }; | |
$_ = chr(104) . $j->(@m[10, 11]) . pack("H*", join('', qw/70 3a 2f 2f/)); | |
$_ .= $m[4] . chr(46) . $m[4] . '<3'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use bigint; | |
use List::Util qw/sum/; | |
my $mod = 10**10; | |
sub binmod{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use List::Util qw/sum/; | |
sub fact{ | |
my $n = shift; | |
return 1 if $n == 0; | |
return $n * &fact($n - 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use List::Util qw/sum/; | |
my %S = (); | |
for(my $i=1000; $i<=9999; $i++){ | |
for(my $j=1; $j*$j<=$i; $j++){ | |
if( $i % $j == 0 ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
sub calc{ | |
my $L = shift; | |
my @coin = $#_ == 0 ? @{$_[0]} : @_; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use List::Util qw/sum/; | |
# (9^5) + (9^5) + (9^5) + (9^5) + (9^5) + (9^5) = 354294 | |
my @res = grep{ my $t = $_; $t == sum map{$_ ** 5} split(//,$t) } 2..354294; | |
print sum @res; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use bigint; | |
use List::MoreUtils qw/uniq/; | |
my ($a, $b) = (100, 100); | |
my @res = uniq map{ my $t = $_; map{ $t ** $_ } 2..$b } 2..$a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use List::Util qw/sum/; | |
my $i; | |
my $res = 0; | |
for($i=1; $i<=999; $i+=2){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
sub is_prime{ | |
my $n = shift; | |
return 0 if $n < 2; |
NewerOlder