aboutsummaryrefslogtreecommitdiff
path: root/challenge-074
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2020-08-23 21:40:47 +0100
committerGitHub <noreply@github.com>2020-08-23 21:40:47 +0100
commitc31062ced9e8cf3b48e7d670b63c3a2cd57f6b09 (patch)
treeb4fd99d343c457d426589aa47c28fe22ab0211f1 /challenge-074
parenta3ec05d6be1096389b987de1f6a25c361498861a (diff)
parent4928c086f0a356e0f95c5317094c1fd877140169 (diff)
downloadperlweeklychallenge-club-c31062ced9e8cf3b48e7d670b63c3a2cd57f6b09.tar.gz
perlweeklychallenge-club-c31062ced9e8cf3b48e7d670b63c3a2cd57f6b09.tar.bz2
perlweeklychallenge-club-c31062ced9e8cf3b48e7d670b63c3a2cd57f6b09.zip
Merge pull request #2132 from holli-holzer/master
nicer
Diffstat (limited to 'challenge-074')
-rw-r--r--challenge-074/markus-holzer/raku/ch-1.raku9
1 files changed, 5 insertions, 4 deletions
diff --git a/challenge-074/markus-holzer/raku/ch-1.raku b/challenge-074/markus-holzer/raku/ch-1.raku
index d02eb546ef..d5cf7fba09 100644
--- a/challenge-074/markus-holzer/raku/ch-1.raku
+++ b/challenge-074/markus-holzer/raku/ch-1.raku
@@ -1,5 +1,6 @@
-my @N = (1, 2, 2, 3, 2, 4, 2);
-my $N = @N.Bag.max( *.value ).value;
-my $T = +@N div 2;
+#my @N = ();
+#my @N = (1, 2, 3);
-say $N > $T ?? $N !! -1; \ No newline at end of file
+my @N = (1, 2, 2, 3, 2, 4, 2);
+my $N = @N.Bag.maxpairs.first.value || 0;
+say $N > +@N div 2 ?? $N !! -1; \ No newline at end of file