Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Purge trailing whitespace
  • Loading branch information
Paul Cochrane committed Apr 28, 2015
1 parent 010c114 commit 9164035
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions categories/euler/prob059-andreoss.pl
Expand Up @@ -67,7 +67,7 @@ sub infix:<XOR>(@cipher, @password) {

my @password = @chunk[^3] XOR @word;
my $count = [+] do for @common-words.grep({$_ !~~ $w}) -> $word {
elems $decrypted ~~ m:g:i/$word/
elems $decrypted ~~ m:g:i/$word/
}

%tries{$password} += $count if $count > 0;
Expand All @@ -89,7 +89,7 @@ (Bool :$verbose = False, :$file = 'cipher.txt', :$word = @common-words[0], :$pas
$pass = %variants.max(*.value).key;
say "The password is more likely to be '$pass'. " if $verbose;
}

my $decrypted = as-word @cipher XOR as-code($pass);

say "The message: {$decrypted.perl}" if $verbose;
Expand Down
2 changes: 1 addition & 1 deletion categories/euler/prob100-andreoss.pl
Expand Up @@ -22,7 +22,7 @@
my $total = 21;

( $blue ,
$total ) = 3 * $blue + 2 * $total - 2,
$total ) = 3 * $blue + 2 * $total - 2,
4 * $blue + 3 * $total - 3
while $total <= 10 ** 12 ;

Expand Down

0 comments on commit 9164035

Please sign in to comment.