diff options
| -rw-r--r-- | challenge-238/rcmlz/raku/ch-1.raku | 15 | ||||
| -rw-r--r-- | challenge-238/rcmlz/raku/ch-2.raku | 35 | ||||
| -rw-r--r-- | members.json | 1 | ||||
| -rw-r--r-- | stats/pwc-challenge-237.json | 273 | ||||
| -rw-r--r-- | stats/pwc-current.json | 321 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 56 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 3240 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 416 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 54 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 54 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 114 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 52 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 56 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 68 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 54 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 124 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 122 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 116 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 654 |
19 files changed, 3008 insertions, 2817 deletions
diff --git a/challenge-238/rcmlz/raku/ch-1.raku b/challenge-238/rcmlz/raku/ch-1.raku new file mode 100644 index 0000000000..040fe5e6b7 --- /dev/null +++ b/challenge-238/rcmlz/raku/ch-1.raku @@ -0,0 +1,15 @@ +unit module rcmlz::raku::task-one:ver<0.0.1>:auth<github:rcmlz>:api<1>; + +# run in terminal: raku --optimize=3 -I challenge-nr238/rcmlz/raku/ -- test/challenge-nr238/raku/task-one.rakutest +# or raku --optimize=3 -I challenge-nr238 -- test/benchmark-scalabiity.raku --task=task-one --user=rcmlz --max-run-times=1,3,7 --max-problem=10 --v=True --test-before-benchmark=True --out-folder=/tmp nr238; cat /tmp/nr238_task-one.csv + +#|[ +You are given an array of integers. + +- Write a script to return the running sum of the given array. + +The running sum can be calculated as sum[i] = num[0] + num[1] + ... + num[i]. +] +our sub solution( @input ) is export { + [\+] @input +}
\ No newline at end of file diff --git a/challenge-238/rcmlz/raku/ch-2.raku b/challenge-238/rcmlz/raku/ch-2.raku new file mode 100644 index 0000000000..5f9d48274b --- /dev/null +++ b/challenge-238/rcmlz/raku/ch-2.raku @@ -0,0 +1,35 @@ +unit module rcmlz::raku::task-two:ver<0.0.1>:auth<github:rcmlz>:api<1>; + +# run in terminal: raku --optimize=3 -I challenge-nr238/rcmlz/raku/ -- test/challenge-nr238/raku/task-two.rakutest +# or raku --optimize=3 -I challenge-nr238 -- test/benchmark-scalabiity.raku --task=task-two --user=rcmlz --max-run-times=1,3,7 --max-problem=10 --v=True --test-before-benchmark=True --out-folder=/tmp nr238; cat /tmp/nr238_task-two.csv + +#|[ +You are given an array of positive integers. + +- Write a script to sort the given array in increasing order with respect to the count of steps required to obtain a single-digit number by multiplying its digits recursively for each array element. + +If any two numbers have the same count of steps, then print the smaller number first. + +Input: @int = (15, 99, 1, 34) +Output: (1, 15, 34, 99) + +15 => 1 x 5 => 5 (1 step) +99 => 9 x 9 => 81 => 8 x 1 => 8 (2 steps) +1 => 0 step +34 => 3 x 4 => 12 => 1 x 2 => 2 (2 steps) +] +our sub solution(@input) is export { + sort &persistence-order, @input +} + +sub split-and-multiply(UInt $x --> UInt){ + return 0 if $x < 10; + my $r = [*] $x.Str.comb.map: *.UInt; + 1 + samewith($r) +} + +sub persistence-order(UInt $a, UInt $b --> Order){ + my ($x, $y) of UInt = ($a, $b).map: *.&split-and-multiply; + my Order $ord = $x cmp $y; + $ord eqv Same ?? $a cmp $b !! $ord +} diff --git a/members.json b/members.json index 40f74ffe8a..a418acec43 100644 --- a/members.json +++ b/members.json @@ -16,6 +16,7 @@ "alexander-pankoff" : "Alexander Pankoff", "andinus" : "Andinus", "andreas-voegele" : "Andreas Voegele", + "augiedb" : "Augie De Blieck Jr.", "aut0exec" : "Rob Turner", "avery-adams" : "Avery Adams", "mathmauney" : "Alex Mauney", diff --git a/stats/pwc-challenge-237.json b/stats/pwc-challenge-237.json index 7056539f52..809aa257e8 100644 --- a/stats/pwc-challenge-237.json +++ b/stats/pwc-challenge-237.json @@ -1,6 +1,20 @@ { - "title" : { - "text" : "The Weekly Challenge - 237" + "legend" : { + "enabled" : 0 + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "xAxis" : { "type" : "category" @@ -8,8 +22,8 @@ "drilldown" : { "series" : [ { - "name" : "Ali Moradi", "id" : "Ali Moradi", + "name" : "Ali Moradi", "data" : [ [ "Perl", @@ -26,6 +40,8 @@ ] }, { + "name" : "Arne Sommer", + "id" : "Arne Sommer", "data" : [ [ "Raku", @@ -35,11 +51,11 @@ "Blog", 1 ] - ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" + ] }, { + "id" : "Athanasius", + "name" : "Athanasius", "data" : [ [ "Perl", @@ -49,11 +65,10 @@ "Raku", 2 ] - ], - "id" : "Athanasius", - "name" : "Athanasius" + ] }, { + "name" : "Avery Adams", "id" : "Avery Adams", "data" : [ [ @@ -64,20 +79,21 @@ "Blog", 2 ] - ], - "name" : "Avery Adams" + ] }, { - "name" : "BarrOff", - "id" : "BarrOff", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "BarrOff", + "id" : "BarrOff" }, { + "id" : "Bob Lied", + "name" : "Bob Lied", "data" : [ [ "Perl", @@ -87,21 +103,21 @@ "Blog", 1 ] - ], - "id" : "Bob Lied", - "name" : "Bob Lied" + ] }, { - "name" : "Bruce Gray", - "id" : "Bruce Gray", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Bruce Gray", + "name" : "Bruce Gray" }, { + "name" : "Dave Jacoby", + "id" : "Dave Jacoby", "data" : [ [ "Perl", @@ -111,23 +127,21 @@ "Blog", 1 ] - ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" + ] }, { + "id" : "David Ferrone", "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ], - "id" : "David Ferrone" + ] }, { - "name" : "E. Choroba", "id" : "E. Choroba", + "name" : "E. Choroba", "data" : [ [ "Perl", @@ -172,14 +186,14 @@ ] }, { + "id" : "Jan Krnavek", "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ], - "id" : "Jan Krnavek" + ] }, { "data" : [ @@ -188,11 +202,22 @@ 2 ] ], - "id" : "Jorg Sommrey", - "name" : "Jorg Sommrey" + "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey" + }, + { + "id" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim", + "data" : [ + [ + "Perl", + 2 + ] + ] }, { "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -206,11 +231,11 @@ "Blog", 1 ] - ], - "name" : "Lubos Kolouch" + ] }, { "name" : "Luca Ferrari", + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -220,8 +245,7 @@ "Blog", 6 ] - ], - "id" : "Luca Ferrari" + ] }, { "name" : "Mark Anderson", @@ -235,16 +259,15 @@ }, { "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh", "data" : [ [ "Perl", 1 ] - ], - "id" : "Matthew Neleigh" + ] }, { - "id" : "Matthias Muth", "data" : [ [ "Perl", @@ -255,11 +278,12 @@ 1 ] ], - "name" : "Matthias Muth" + "name" : "Matthias Muth", + "id" : "Matthias Muth" }, { - "name" : "Packy Anderson", "id" : "Packy Anderson", + "name" : "Packy Anderson", "data" : [ [ "Perl", @@ -276,6 +300,8 @@ ] }, { + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -285,31 +311,30 @@ "Blog", 1 ] - ], - "id" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith" + ] }, { - "name" : "Peter Meszaros", - "id" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Peter Meszaros", + "id" : "Peter Meszaros" }, { - "name" : "rcmlz", "data" : [ [ "Raku", 2 ] ], - "id" : "rcmlz" + "id" : "rcmlz", + "name" : "rcmlz" }, { + "id" : "Robbie Hatley", "name" : "Robbie Hatley", "data" : [ [ @@ -320,10 +345,10 @@ "Blog", 1 ] - ], - "id" : "Robbie Hatley" + ] }, { + "name" : "Robert DiCicco", "id" : "Robert DiCicco", "data" : [ [ @@ -334,22 +359,19 @@ "Raku", 2 ] - ], - "name" : "Robert DiCicco" + ] }, { - "id" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] ], + "id" : "Robert Ransbottom", "name" : "Robert Ransbottom" }, { - "name" : "Roger Bell_West", - "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -363,9 +385,12 @@ "Blog", 1 ] - ] + ], + "id" : "Roger Bell_West", + "name" : "Roger Bell_West" }, { + "id" : "Simon Green", "name" : "Simon Green", "data" : [ [ @@ -376,11 +401,9 @@ "Blog", 1 ] - ], - "id" : "Simon Green" + ] }, { - "name" : "Thomas Kohler", "data" : [ [ "Perl", @@ -391,9 +414,12 @@ 2 ] ], + "name" : "Thomas Kohler", "id" : "Thomas Kohler" }, { + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -403,12 +429,11 @@ "Raku", 2 ] - ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + ] }, { "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -418,12 +443,9 @@ "Blog", 1 ] - ], - "id" : "W. Luis Mochan" + ] }, { - "name" : "Yves Orton", - "id" : "Yves Orton", "data" : [ [ "Perl", @@ -433,27 +455,12 @@ "Blog", 1 ] - ] + ], + "id" : "Yves Orton", + "name" : "Yves Orton" } ] }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "legend" : { - "enabled" : 0 - }, "chart" : { "type" : "column" }, @@ -463,12 +470,10 @@ "followPointer" : 1 }, "subtitle" : { - "text" : "[Champions: 32] Last updated at 2023-10-09 19:29:15 GMT" + "text" : "[Champions: 33] Last updated at 2023-10-15 08:53:35 GMT" }, "series" : [ { - "name" : "The Weekly Challenge - 237", - "colorByPoint" : 1, "data" : [ { "y" : 5, @@ -476,28 +481,28 @@ "drilldown" : "Ali Moradi" }, { - "y" : 3, + "name" : "Arne Sommer", "drilldown" : "Arne Sommer", - "name" : "Arne Sommer" + "y" : 3 }, { "y" : 4, - "drilldown" : "Athanasius", - "name" : "Athanasius" + "name" : "Athanasius", + "drilldown" : "Athanasius" }, { "y" : 3, - "drilldown" : "Avery Adams", - "name" : "Avery Adams" + "name" : "Avery Adams", + "drilldown" : "Avery Adams" }, { "y" : 2, - "drilldown" : "BarrOff", - "name" : "BarrOff" + "name" : "BarrOff", + "drilldown" : "BarrOff" }, { - "name" : "Bob Lied", "drilldown" : "Bob Lied", + "name" : "Bob Lied", "y" : 3 }, { @@ -517,8 +522,8 @@ }, { "y" : 2, - "name" : "E. Choroba", - "drilldown" : "E. Choroba" + "drilldown" : "E. Choroba", + "name" : "E. Choroba" }, { "drilldown" : "Flavio Poletti", @@ -526,54 +531,59 @@ "y" : 6 }, { - "drilldown" : "Jaldhar H. Vyas", "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas", "y" : 5 }, { - "drilldown" : "Jan Krnavek", + "y" : 2, "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey", "y" : 2 }, { "y" : 2, - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey" + "name" : "Kjetil Skotheim", + "drilldown" : "Kjetil Skotheim" }, { + "y" : 5, "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch", - "y" : 5 + "name" : "Lubos Kolouch" }, { - "y" : 8, "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" + "drilldown" : "Luca Ferrari", + "y" : 8 }, { - "y" : 2, "drilldown" : "Mark Anderson", - "name" : "Mark Anderson" + "name" : "Mark Anderson", + "y" : 2 }, { - "name" : "Matthew Neleigh", "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", "y" : 1 }, { "y" : 3, - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth" + "drilldown" : "Matthias Muth", + "name" : "Matthias Muth" }, { + "y" : 5, "drilldown" : "Packy Anderson", - "name" : "Packy Anderson", - "y" : 5 + "name" : "Packy Anderson" }, { - "name" : "Peter Campbell Smith", + "y" : 3, "drilldown" : "Peter Campbell Smith", - "y" : 3 + "name" : "Peter Campbell Smith" }, { "name" : "Peter Meszaros", @@ -581,9 +591,9 @@ "y" : 2 }, { - "y" : 2, "name" : "rcmlz", - "drilldown" : "rcmlz" + "drilldown" : "rcmlz", + "y" : 2 }, { "y" : 3, @@ -591,9 +601,9 @@ "drilldown" : "Robbie Hatley" }, { - "drilldown" : "Robert DiCicco", + "y" : 4, "name" : "Robert DiCicco", - "y" : 4 + "drilldown" : "Robert DiCicco" }, { "drilldown" : "Robert Ransbottom", @@ -601,19 +611,19 @@ "y" : 2 }, { - "y" : 5, + "name" : "Roger Bell_West", "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West" + "y" : 5 }, { "y" : 3, - "drilldown" : "Simon Green", - "name" : "Simon Green" + "name" : "Simon Green", + "drilldown" : "Simon Green" }, { - "y" : 4, + "drilldown" : "Thomas Kohler", "name" : "Thomas Kohler", - "drilldown" : "Thomas Kohler" + "y" : 4 }, { "name" : "Ulrich Rieke", @@ -621,16 +631,21 @@ "y" : 4 }, { - "drilldown" : "W. Luis Mochan", + "y" : 3, "name" : "W. Luis Mochan", - "y" : 3 + "drilldown" : "W. Luis Mochan" }, { - "name" : "Yves Orton", "drilldown" : "Yves Orton", + "name" : "Yves Orton", "y" : 3 } - ] + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 237" } - ] + ], + "title" : { + "text" : "The Weekly Challenge - 237" + } } diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 171751b13f..2dd836b7c0 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,11 +1,21 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "subtitle" : { + "text" : "[Champions: 32] Last updated at 2023-10-15 08:57:41 GMT" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } } }, - "xAxis" : { - "type" : "category" + "legend" : { + "enabled" : 0 + }, + "title" : { + "text" : "The Weekly Challenge - 238" }, "drilldown" : { "series" : [ @@ -28,18 +38,16 @@ "name" : "Ali Moradi" }, { - "id" : "Andrew Grangaard", "data" : [ [ "Perl", 2 ] ], + "id" : "Andrew Grangaard", "name" : "Andrew Grangaard" }, { - "id" : "Arne Sommer", - "name" : "Arne Sommer", "data" : [ [ "Raku", @@ -49,11 +57,13 @@ "Blog", 1 ] - ] + ], + "id" : "Arne Sommer", + "name" : "Arne Sommer" }, { - "id" : "Athanasius", "name" : "Athanasius", + "id" : "Athanasius", "data" : [ [ "Perl", @@ -66,7 +76,21 @@ ] }, { - "name" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 3 + ] + ], + "id" : "Augie De Blieck Jr.", + "name" : "Augie De Blieck Jr." + }, + { + "id" : "Bob Lied", "data" : [ [ "Perl", @@ -77,7 +101,17 @@ 1 ] ], - "id" : "Bob Lied" + "name" : "Bob Lied" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" }, { "name" : "Dave Jacoby", @@ -95,46 +129,67 @@ }, { "id" : "David Ferrone", - "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "David Ferrone" }, { "name" : "E. Choroba", + "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ], - "id" : "E. Choroba" + ] }, { - "id" : "Humberto Massa", "name" : "Humberto Massa", "data" : [ [ "Raku", 2 ] + ], + "id" : "Humberto Massa" + }, + { + "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ] ] }, { "data" : [ [ "Perl", - 1 + 2 ] ], + "id" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim" + }, + { "name" : "Lance Wicks", + "data" : [ + [ + "Perl", + 1 + ] + ], "id" : "Lance Wicks" }, { "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -148,12 +203,9 @@ "Blog", 2 ] - ], - "id" : "Laurent Rosenfeld" + ] }, { - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -167,9 +219,13 @@ "Blog", 1 ] - ] + ], + "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch" }, { + "name" : "Luca Ferrari", + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -179,9 +235,7 @@ "Blog", 7 ] - ], - "name" : "Luca Ferrari", - "id" : "Luca Ferrari" + ] }, { "data" : [ @@ -190,32 +244,30 @@ 2 ] ], - "name" : "Mark Anderson", - "id" : "Mark Anderson" + "id" : "Mark Anderson", + "name" : "Mark Anderson" }, { + "name" : "Matthew Neleigh", "id" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ], - "name" : "Matthew Neleigh" + ] }, { + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], - "name" : "Niels van Dijke", "id" : "Niels van Dijke" }, { - "id" : "Packy Anderson", - "name" : "Packy Anderson", "data" : [ [ "Perl", @@ -229,9 +281,13 @@ "Blog", 1 ] - ] + ], + "id" : "Packy Anderson", + "name" : "Packy Anderson" }, { + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -241,9 +297,7 @@ "Blog", 1 ] - ], - "name" : "Peter Campbell Smith", - "id" : "Peter Campbell Smith" + ] }, { "data" : [ @@ -252,8 +306,18 @@ 2 ] ], - "name" : "Peter Meszaros", - "id" : "Peter Meszaros" + "id" : "Peter Meszaros", + "name" : "Peter Meszaros" + }, + { + "name" : "rcmlz", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "rcmlz" }, { "id" : "Robbie Hatley", @@ -270,6 +334,8 @@ "name" : "Robbie Hatley" }, { + "name" : "Robert DiCicco", + "id" : "Robert DiCicco", "data" : [ [ "Perl", @@ -279,11 +345,20 @@ "Raku", 2 ] + ] + }, + { + "name" : "Robert Ransbottom", + "data" : [ + [ + "Raku", + 2 + ] ], - "name" : "Robert DiCicco", - "id" : "Robert DiCicco" + "id" : "Robert Ransbottom" }, { + "name" : "Roger Bell_West", "id" : "Roger Bell_West", "data" : [ [ @@ -293,12 +368,29 @@ [ "Raku", 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Simon Green", + "data" : [ |
