diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-02-26 12:54:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-26 12:54:42 +0000 |
| commit | 8f6e44295997c5e5ae3d3feb40508173a4ce45a8 (patch) | |
| tree | 9336663cf50ad8a2bd456ab364cddf2276df1626 | |
| parent | 438f2178f8b06d643f0f89493656e3c7dc5fe336 (diff) | |
| parent | cac984b82e2400bb35ed8265278ba626093ae2b5 (diff) | |
| download | perlweeklychallenge-club-8f6e44295997c5e5ae3d3feb40508173a4ce45a8.tar.gz perlweeklychallenge-club-8f6e44295997c5e5ae3d3feb40508173a4ce45a8.tar.bz2 perlweeklychallenge-club-8f6e44295997c5e5ae3d3feb40508173a4ce45a8.zip | |
Merge pull request #1313 from holli-holzer/master
didn't work. now it does
| -rw-r--r-- | challenge-049/markus-holzer/raku/ch-1.p6 | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/challenge-049/markus-holzer/raku/ch-1.p6 b/challenge-049/markus-holzer/raku/ch-1.p6 index 44a9b0861b..69827afbac 100644 --- a/challenge-049/markus-holzer/raku/ch-1.p6 +++ b/challenge-049/markus-holzer/raku/ch-1.p6 @@ -1,8 +1,4 @@ -sub MAIN( $n ) +sub MAIN( $n ) { - # I have no formal proof for this, but I have a strong hunch that it's true. - say "Impossible" and exit - if so ( 2, 4, 8 ... *² > $n ).first( $n %% * ); - - say (1, 10, { $_ %% 2 ?? $_ + 1 !! $_ * 10 } ... *).first( * %% $n ); + say (1 .. Inf).map( *.base(2).Str ).first( * %% $n ); } |
