diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-12-04 11:57:29 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-12-04 11:57:29 +0000 |
| commit | f43e58f9d951d2dacc7175d65662eb2be7e06165 (patch) | |
| tree | 803f5d15314b76d5a22205a9dae920b6fc35ecd2 | |
| parent | d544385bd75b8f6efbf4e40e21ec389f78483a65 (diff) | |
| download | perlweeklychallenge-club-f43e58f9d951d2dacc7175d65662eb2be7e06165.tar.gz perlweeklychallenge-club-f43e58f9d951d2dacc7175d65662eb2be7e06165.tar.bz2 perlweeklychallenge-club-f43e58f9d951d2dacc7175d65662eb2be7e06165.zip | |
- Added solutions by Niels van Dijke.
- Added solutions by Laurent Rosenfeld.
21 files changed, 2107 insertions, 2055 deletions
diff --git a/challenge-246/laurent-rosenfeld/blog.txt b/challenge-246/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..cb3a874b27 --- /dev/null +++ b/challenge-246/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/12/perl-weekly-challenge-246-6-out-of-49.html diff --git a/challenge-246/laurent-rosenfeld/perl/ch-1.pl b/challenge-246/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..347c0d34b5 --- /dev/null +++ b/challenge-246/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,12 @@ +use strict; +use warnings; +use feature 'say'; + +my %result; +while (%result < 6) { + # get random integers in the range 1..49 + my $rand = int( rand 49) + 1; + # discard duplicates + $result{$rand} = 1 unless exists $result{$rand}; +} +say join " ", keys %result; diff --git a/challenge-246/laurent-rosenfeld/raku/ch-1.raku b/challenge-246/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..ab237a21b3 --- /dev/null +++ b/challenge-246/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1 @@ +say (1..49).pick: 6; diff --git a/challenge-246/perlboy1967/perl/ch1.pl b/challenge-246/perlboy1967/perl/ch-1.pl index c1fdf6ca2b..c1fdf6ca2b 100755 --- a/challenge-246/perlboy1967/perl/ch1.pl +++ b/challenge-246/perlboy1967/perl/ch-1.pl diff --git a/challenge-246/perlboy1967/perl/ch2.pl b/challenge-246/perlboy1967/perl/ch-2.pl index 9d2000f6a6..9d2000f6a6 100755 --- a/challenge-246/perlboy1967/perl/ch2.pl +++ b/challenge-246/perlboy1967/perl/ch-2.pl diff --git a/stats/pwc-current.json b/stats/pwc-current.json index b518c2501e..3afa0b07eb 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,40 +1,100 @@ { - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 + "series" : [ + { + "data" : [ + { + "drilldown" : "David Ferrone", + "y" : 2, + "name" : "David Ferrone" + }, + { + "drilldown" : "Laurent Rosenfeld", + "y" : 3, + "name" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 10, + "name" : "Luca Ferrari" + }, + { + "drilldown" : "Niels van Dijke", + "y" : 2, + "name" : "Niels van Dijke" + }, + { + "y" : 3, + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan" + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 246" } - }, - "xAxis" : { - "type" : "category" - }, - "title" : { - "text" : "The Weekly Challenge - 246" - }, + ], "legend" : { "enabled" : 0 }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "tooltip" : { - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", "followPointer" : 1, - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" + }, + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "[Champions: 5] Last updated at 2023-12-04 11:54:41 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } }, "drilldown" : { "series" : [ { - "name" : "David Ferrone", - "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "David Ferrone", + "id" : "David Ferrone" }, { + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" + }, + { + "name" : "Luca Ferrari", "id" : "Luca Ferrari", "data" : [ [ @@ -45,12 +105,21 @@ "Blog", 8 ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] ], - "name" : "Luca Ferrari" + "id" : "Niels van Dijke", + "name" : "Niels van Dijke" }, { - "name" : "W. Luis Mochan", "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -64,38 +133,7 @@ } ] }, - "series" : [ - { - "data" : [ - { - "y" : 2, - "drilldown" : "David Ferrone", - "name" : "David Ferrone" - }, - { - "y" : 10, - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari" - }, - { - "y" : 3, - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan" - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 246" - } - ], - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "subtitle" : { - "text" : "[Champions: 3] Last updated at 2023-12-04 11:07:42 GMT" - }, - "chart" : { - "type" : "column" + "title" : { + "text" : "The Weekly Challenge - 246" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 6b38f33c09..93aa626f21 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,63 +1,63 @@ { - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "Last updated at 2023-12-04 11:54:41 GMT" }, "xAxis" : { - "type" : "category", "labels" : { "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" } - } - }, - "subtitle" : { - "text" : "Last updated at 2023-12-04 11:07:42 GMT" + }, + "type" : "category" }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" }, "series" : [ { + "name" : "Contributions", "dataLabels" : { - "align" : "right", + "format" : "{point.y:.0f}", "enabled" : "true", + "align" : "right", "rotation" : -90, - "color" : "#FFFFFF", - "format" : "{point.y:.0f}", - "y" : 10, "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + }, + "y" : 10, + "color" : "#FFFFFF" }, "data" : [ [ "Blog", - 4270 + 4271 ], [ "Perl", - 12673 + 12676 ], [ "Raku", - 7311 + 7312 ] - ], - "name" : "Contributions" + ] } ], - "chart" : { - "type" : "column" + "legend" : { + "enabled" : "false" + }, + "yAxis" : { + "title" : { + "text" : null + }, + "min" : 0 }, "tooltip" : { "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "legend" : { - "enabled" : "false" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index a951c9338f..53d3ac1ee9 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,18 +1,12 @@ { + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2023-12-04 11:54:41 GMT" + }, "xAxis" : { "type" : "category" }, - "title" : { - "text" : "The Weekly Challenge Language" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } + "chart" : { + "type" : "column" }, "drilldown" : { "series" : [ @@ -31,11 +25,10 @@ 12 ] ], - "id" : "001", - "name" : "001" + "name" : "001", + "id" : "001" }, { - "id" : "002", "data" : [ [ "Perl", @@ -50,9 +43,12 @@ 10 ] ], - "name" : "002" + "name" : "002", + "id" : "002" }, { + "id" : "003", + "name" : "003", "data" : [ [ "Perl", @@ -66,13 +62,9 @@ "Blog", 9 ] - ], - "id" : "003", - "name" : "003" + ] }, { - "name" : "004", - "id" : "004", "data" : [ [ "Perl", @@ -86,10 +78,11 @@ "Blog", 10 ] - ] + ], + "name" : "004", + "id" : "004" }, { - "id" : "005", "data" : [ [ "Perl", @@ -104,6 +97,7 @@ 12 ] ], + "id" : "005", "name" : "005" }, { @@ -125,7 +119,6 @@ "name" : "006" }, { - "id" : "007", "data" : [ [ "Perl", @@ -140,7 +133,8 @@ 10 ] ], - "name" : "007" + "name" : "007", + "id" : "007" }, { "name" : "008", @@ -161,6 +155,8 @@ ] }, { + "id" : "009", + "name" : "009", "data" : [ [ "Perl", @@ -174,11 +170,11 @@ "Blog", 13 ] - ], - "id" : "009", - "name" : "009" + ] }, { + "name" : "010", + "id" : "010", "data" : [ [ "Perl", @@ -192,9 +188,7 @@ "Blog", 11 ] - ], - "id" : "010", - "name" : "010" + ] }, { "name" : "011", @@ -215,7 +209,6 @@ ] }, { - "id" : "012", "data" : [ [ "Perl", @@ -230,7 +223,8 @@ 11 ] ], - "name" : "012" + "name" : "012", + "id" : "012" }, { "data" : [ @@ -251,8 +245,6 @@ "name" : "013" }, { - "name" : "014", - "id" : "014", "data" : [ [ "Perl", @@ -266,9 +258,12 @@ "Blog", 15 ] - ] + ], + "name" : "014", + "id" : "014" }, { + "name" : "015", "id" : "015", "data" : [ [ @@ -283,12 +278,11 @@ "Blog", 15 ] - ], - "name" : "015" + ] }, { - "name" : "016", "id" : "016", + "name" : "016", "data" : [ [ "Perl", @@ -319,11 +313,10 @@ 12 ] ], - "id" : "017", - "name" : "017" + "name" : "017", + "id" : "017" }, { - "name" : "018", "data" : [ [ "Perl", @@ -338,7 +331,8 @@ 14 ] ], - "id" : "018" + "id" : "018", + "name" : "018" }, { "name" : "019", @@ -359,7 +353,6 @@ ] }, { - "id" : "020", "data" : [ [ "Perl", @@ -374,10 +367,10 @@ 13 ] ], - "name" : "020" + "name" : "020", + "id" : "020" }, { - "id" : "021", "data" : [ [ "Perl", @@ -392,7 +385,8 @@ 10 ] ], - "name" : "021" + "name" : "021", + "id" : "021" }, { "data" : [ @@ -431,6 +425,7 @@ "name" : "023" }, { + "name" : "024", "id" : "024", "data" : [ [ @@ -445,11 +440,11 @@ "Blog", 11 ] - ], - "name" : "024" + ] }, { "name" : "025", + "id" : "025", "data" : [ [ "Perl", @@ -463,11 +458,9 @@ "Blog", 12 ] - ], - "id" : "025" + ] }, { - "id" : "026", "data" : [ [ "Perl", @@ -482,7 +475,8 @@ 10 ] ], - "name" : "026" + "name" : "026", + "id" : "026" }, { "data" : [ @@ -499,11 +493,10 @@ 9 ] ], - "id" : "027", - "name" : "027" + "name" : "027", + "id" : "027" }, { - "id" : "028", "data" : [ [ "Perl", @@ -518,10 +511,10 @@ 9 ] ], - "name" : "028" + "name" : "028", + "id" : "028" }, { - "name" : "029", "data" : [ [ "Perl", @@ -536,6 +529,7 @@ 12 ] ], + "name" : "029", "id" : "029" }, { @@ -553,12 +547,12 @@ 10 ] ], - "id" : "030", - "name" : "030" + "name" : "030", + "id" : "030" }, { - "name" : "031", "id" : "031", + "name" : "031", "data" : [ [ "Perl", @@ -575,6 +569,7 @@ ] }, { + "id" : "032", "name" : "032", "data" : [ [ @@ -589,11 +584,9 @@ "Blog", 10 ] - ], - "id" : "032" + ] }, { - "id" : "033", "data" : [ [ "Perl", @@ -608,9 +601,12 @@ 10 ] ], - "name" : "033" + "name" : "033", + "id" : "033" }, { + "name" : "034", + "id" : "034", "data" : [ [ "Perl", @@ -624,12 +620,9 @@ "Blog", 11 ] - ], - "id" : "034", - "name" : "034" + ] }, { - "id" : "035", "data" : [ [ "Perl", @@ -644,9 +637,12 @@ 9 ] ], - "name" : "035" + "name" : "035", + "id" : "035" }, { + "name" : "036", + "id" : "036", "data" : [ [ "Perl", @@ -660,13 +656,11 @@ "Blog", 11 ] - ], - "id" : "036", - "name" : "036" + ] }, { - "name" : "037", "id" : "037", + "name" : "037", "data" : [ [ "Perl", @@ -683,8 +677,8 @@ ] }, { - "name" : "038", "id" : "038", + "name" : "038", "data" : [ [ "Perl", @@ -701,6 +695,7 @@ ] }, { + "id" : "039", "name" : "039", "data" : [ [ @@ -715,8 +710,7 @@ "Blog", 12 ] - ], - "id" : "039" + ] }, { "data" : [ @@ -733,11 +727,10 @@ 10 ] ], - "id" : "040", - "name" : "040" + "name" : "040", + "id" : "040" }, { - "id" : "041", "data" : [ [ "Perl", @@ -752,9 +745,11 @@ 9 ] ], + "id" : "041", "name" : "041" }, { + "name" : "042", "id" : "042", "data" : [ [ @@ -769,11 +764,9 @@ "Blog", 11 ] - ], - "name" : "042" + ] }, { - "id" : "043", "data" : [ [ "Perl", @@ -788,10 +781,10 @@ 11 ] ], + "id" : "043", "name" : "043" }, { - "name" : "044", "data" : [ [ "Perl", @@ -806,9 +799,11 @@ 11 ] ], - "id" : "044" + "id" : "044", + "name" : "044" }, { + "id" : "045", "name" : "045", "data" : [ [ @@ -823,8 +818,7 @@ "Blog", 11 ] - ], - "id" : "045" + ] }, { "data" : [ @@ -845,6 +839,8 @@ "name" : "046" }, { + "name" : "047", + "id" : "047", "data" : [ [ "Perl", @@ -858,12 +854,11 @@ "Blog", 10 ] - ], - "id" : "047", - "name" : "047" + ] }, { "name" : "048", + "id" : "048", "data" : [ [ "Perl", @@ -877,11 +872,11 @@ "Blog", 12 ] - ], - "id" : "048" + ] }, { "id" : "049", + "name" : "049", "data" : [ [ "Perl", @@ -895,8 +890,7 @@ "Blog", 12 ] - ], - "name" : "049" + ] }, { "data" : [ @@ -913,12 +907,12 @@ 12 ] ], - "id" : "050", - "name" : "050" + "name" : "050", + "id" : "050" }, { - "name" : "051", "id" : "051", + "name" : "051", "data" : [ [ "Perl", @@ -935,7 +929,6 @@ ] }, { - "name" : "052", "data" : [ [ "Perl", @@ -950,9 +943,11 @@ 14 ] ], - "id" : "052" + "id" : "052", + "name" : "052" }, { + "id" : "053", "name" : "053", "data" : [ [ @@ -967,12 +962,11 @@ "Blog", 15 ] - ], - "id" : "053" + ] }, { - "name" : "054", "id" : "054", + "name" : "054", "data" : [ [ "Perl", @@ -1007,7 +1001,6 @@ ] }, { - "name" : "056", "data" : [ [ "Perl", @@ -1022,11 +1015,10 @@ 17 ] ], + "name" : "056", "id" : "056" }, { - "name" : "057", - "id" : "057", "data" : [ [ "Perl", @@ -1040,7 +1032,9 @@ "Blog", 15 ] - ] + ], + "id" : "057", + "name" : "057" }, { "name" : "058", @@ -1061,7 +1055,6 @@ ] }, { - "id" : "059", "data" : [ [ "Perl", @@ -1076,9 +1069,11 @@ 16 ] ], - "name" : "059" + "name" : "059", + "id" : "059" }, { + "name" : "060", "id" : "060", "data" : [ [ @@ -1093,8 +1088,7 @@ "Blog", 16 ] - ], - "name" : "060" + ] }, { "data" : [ @@ -1115,7 +1109,6 @@ "name" : "061" }, { - "name" : "062", "data" : [ [ "Perl", @@ -1130,11 +1123,10 @@ 11 ] ], + "name" : "062", "id" : "062" }, { - "name" : "063", - "id" : "063", "data" : [ [ "Perl", @@ -1148,10 +1140,11 @@ "Blog", 13 ] - ] + ], + "id" : "063", + "name" : "063" }, { - "name" : "064", "data" : [ [ "Perl", @@ -1166,7 +1159,8 @@ 16 ] ], - "id" : "064" + "id" : "064", + "name" : "064" }, { "data" : [ @@ -1183,10 +1177,12 @@ 15 |
