aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2022-02-23 08:26:16 +0000
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2022-02-23 08:26:16 +0000
commitb44719f171b42ef306e7e50933125b7b1371b38d (patch)
treef19db2619ac626262d52e3ef2c9ba437e2351ae4
parenteb39ddda8ac5d602e552fab5289191be7e1bcf5b (diff)
downloadperlweeklychallenge-club-b44719f171b42ef306e7e50933125b7b1371b38d.tar.gz
perlweeklychallenge-club-b44719f171b42ef306e7e50933125b7b1371b38d.tar.bz2
perlweeklychallenge-club-b44719f171b42ef306e7e50933125b7b1371b38d.zip
- Added contributions by Laurent Rosenfeld.
-rw-r--r--challenge-153/laurent-rosenfeld/blog.txt1
-rw-r--r--challenge-153/laurent-rosenfeld/julia/ch-1.jl6
-rw-r--r--challenge-153/laurent-rosenfeld/perl/ch-1.pl9
-rw-r--r--challenge-153/laurent-rosenfeld/perl/ch-2.pl23
-rw-r--r--challenge-153/laurent-rosenfeld/raku/ch-1.raku5
-rw-r--r--challenge-153/laurent-rosenfeld/raku/ch-2.raku5
-rw-r--r--stats/pwc-current.json169
-rw-r--r--stats/pwc-language-breakdown-summary.json60
-rw-r--r--stats/pwc-language-breakdown.json988
-rw-r--r--stats/pwc-leaders.json740
-rw-r--r--stats/pwc-summary-1-30.json40
-rw-r--r--stats/pwc-summary-121-150.json102
-rw-r--r--stats/pwc-summary-151-180.json104
-rw-r--r--stats/pwc-summary-181-210.json50
-rw-r--r--stats/pwc-summary-211-240.json56
-rw-r--r--stats/pwc-summary-241-270.json74
-rw-r--r--stats/pwc-summary-31-60.json120
-rw-r--r--stats/pwc-summary-61-90.json44
-rw-r--r--stats/pwc-summary-91-120.json44
-rw-r--r--stats/pwc-summary.json46
20 files changed, 1379 insertions, 1307 deletions
diff --git a/challenge-153/laurent-rosenfeld/blog.txt b/challenge-153/laurent-rosenfeld/blog.txt
new file mode 100644
index 0000000000..b6c4b5e993
--- /dev/null
+++ b/challenge-153/laurent-rosenfeld/blog.txt
@@ -0,0 +1 @@
+http://blogs.perl.org/users/laurent_r/2022/02/perl-weekly-challenge-153-left-factorials-and-factorions.html
diff --git a/challenge-153/laurent-rosenfeld/julia/ch-1.jl b/challenge-153/laurent-rosenfeld/julia/ch-1.jl
new file mode 100644
index 0000000000..631ebf5ae6
--- /dev/null
+++ b/challenge-153/laurent-rosenfeld/julia/ch-1.jl
@@ -0,0 +1,6 @@
+a = [1, 2] # Julia arrays start with index 1
+
+for n in 3:10
+ push!(a, n * a[n - 1] - (n - 1) * a[n - 2])
+end
+println(a)
diff --git a/challenge-153/laurent-rosenfeld/perl/ch-1.pl b/challenge-153/laurent-rosenfeld/perl/ch-1.pl
new file mode 100644
index 0000000000..dad7d97ef5
--- /dev/null
+++ b/challenge-153/laurent-rosenfeld/perl/ch-1.pl
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use feature "say";
+
+my @a = (0, 1);
+for my $n (2..10) {
+ $a[$n] = $n * $a[$n -1] - ($n - 1) * $a[$n - 2];
+}
+say "@a[1..10]";
diff --git a/challenge-153/laurent-rosenfeld/perl/ch-2.pl b/challenge-153/laurent-rosenfeld/perl/ch-2.pl
new file mode 100644
index 0000000000..f9c6932b38
--- /dev/null
+++ b/challenge-153/laurent-rosenfeld/perl/ch-2.pl
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+use feature "say";
+
+sub fact {
+ my $i = shift;
+ my $prod = 1;
+ $prod *= $_ for 2..$i;
+ return $prod;
+}
+
+my @digit_fact = map {fact $_} 0..9;
+
+sub is_factorion {
+ my $in = shift;
+ my $sum = 0;
+ $sum += $_ for map { $digit_fact[$_] } split //, $in;
+ return $sum == $in;
+ #say $sum;
+}
+for (1..50000) {
+ say $_ if is_factorion($_)
+}
diff --git a/challenge-153/laurent-rosenfeld/raku/ch-1.raku b/challenge-153/laurent-rosenfeld/raku/ch-1.raku
new file mode 100644
index 0000000000..0e6049ad42
--- /dev/null
+++ b/challenge-153/laurent-rosenfeld/raku/ch-1.raku
@@ -0,0 +1,5 @@
+my @a = 0, 1, 2;
+for 3..10 -> $n {
+ @a[$n] = $n * @a[$n -1] - ($n - 1) * @a[$n - 2];
+}
+say @a[1..10];
diff --git a/challenge-153/laurent-rosenfeld/raku/ch-2.raku b/challenge-153/laurent-rosenfeld/raku/ch-2.raku
new file mode 100644
index 0000000000..338f9f0f65
--- /dev/null
+++ b/challenge-153/laurent-rosenfeld/raku/ch-2.raku
@@ -0,0 +1,5 @@
+sub is_factorion (Int $in) {
+ my $sum = [+] map { [*] 1..$_ }, $in.comb;
+ return $sum == $in;
+}
+say $_ if is_factorion $_ for 1..50000;
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index fbb55a7467..f02179f78c 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,17 +1,21 @@
{
+ "chart" : {
+ "type" : "column"
+ },
"series" : [
{
+ "colorByPoint" : 1,
"name" : "The Weekly Challenge - 153",
"data" : [
{
+ "drilldown" : "Abigail",
"name" : "Abigail",
- "y" : 2,
- "drilldown" : "Abigail"
+ "y" : 2
},
{
- "drilldown" : "Dave Jacoby",
"name" : "Dave Jacoby",
- "y" : 3
+ "y" : 3,
+ "drilldown" : "Dave Jacoby"
},
{
"y" : 2,
@@ -19,8 +23,13 @@
"drilldown" : "E. Choroba"
},
{
- "name" : "Luca Ferrari",
+ "drilldown" : "Laurent Rosenfeld",
+ "name" : "Laurent Rosenfeld",
+ "y" : 5
+ },
+ {
"y" : 4,
+ "name" : "Luca Ferrari",
"drilldown" : "Luca Ferrari"
},
{
@@ -29,19 +38,19 @@
"y" : 2
},
{
- "name" : "Marton Polgar",
"y" : 2,
+ "name" : "Marton Polgar",
"drilldown" : "Marton Polgar"
},
{
- "name" : "Matthew Neleigh",
"y" : 2,
+ "name" : "Matthew Neleigh",
"drilldown" : "Matthew Neleigh"
},
{
+ "drilldown" : "Olivier Delouya",
"y" : 1,
- "name" : "Olivier Delouya",
- "drilldown" : "Olivier Delouya"
+ "name" : "Olivier Delouya"
},
{
"drilldown" : "Peter Campbell Smith",
@@ -49,9 +58,9 @@
"y" : 3
},
{
- "name" : "PokGoPun",
+ "drilldown" : "PokGoPun",
"y" : 2,
- "drilldown" : "PokGoPun"
+ "name" : "PokGoPun"
},
{
"drilldown" : "Robert DiCicco",
@@ -59,58 +68,23 @@
"y" : 4
},
{
- "drilldown" : "Roger Bell_West",
+ "y" : 4,
"name" : "Roger Bell_West",
- "y" : 4
+ "drilldown" : "Roger Bell_West"
},
{
- "drilldown" : "Ulrich Rieke",
"y" : 4,
- "name" : "Ulrich Rieke"
+ "name" : "Ulrich Rieke",
+ "drilldown" : "Ulrich Rieke"
},
{
- "drilldown" : "W. Luis Mochan",
"y" : 3,
- "name" : "W. Luis Mochan"
+ "name" : "W. Luis Mochan",
+ "drilldown" : "W. Luis Mochan"
}
- ],
- "colorByPoint" : 1
+ ]
}
],
- "title" : {
- "text" : "The Weekly Challenge - 153"
- },
- "xAxis" : {
- "type" : "category"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "tooltip" : {
- "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"
- },
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- },
- "borderWidth" : 0
- }
- },
- "legend" : {
- "enabled" : 0
- },
- "subtitle" : {
- "text" : "[Champions: 14] Last updated at 2022-02-23 08:06:33 GMT"
- },
"drilldown" : {
"series" : [
{
@@ -138,17 +112,35 @@
"name" : "Dave Jacoby"
},
{
- "id" : "E. Choroba",
"data" : [
[
"Perl",
2
]
],
+ "id" : "E. Choroba",
"name" : "E. Choroba"
},
{
- "id" : "Luca Ferrari",
+ "name" : "Laurent Rosenfeld",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Laurent Rosenfeld"
+ },
+ {
+ "name" : "Luca Ferrari",
"data" : [
[
"Raku",
@@ -159,7 +151,7 @@
2
]
],
- "name" : "Luca Ferrari"
+ "id" : "Luca Ferrari"
},
{
"name" : "Mark Anderson",
@@ -172,37 +164,36 @@
"id" : "Mark Anderson"
},
{
+ "name" : "Marton Polgar",
"data" : [
[
"Raku",
2
]
],
- "name" : "Marton Polgar",
"id" : "Marton Polgar"
},
{
- "id" : "Matthew Neleigh",
"name" : "Matthew Neleigh",
"data" : [
[
"Perl",
2
]
- ]
+ ],
+ "id" : "Matthew Neleigh"
},
{
- "id" : "Olivier Delouya",
- "name" : "Olivier Delouya",
"data" : [
[
"Perl",
1
]
- ]
+ ],
+ "id" : "Olivier Delouya",
+ "name" : "Olivier Delouya"
},
{
- "id" : "Peter Campbell Smith",
"name" : "Peter Campbell Smith",
"data" : [
[
@@ -213,20 +204,20 @@
"Blog",
1
]
- ]
+ ],
+ "id" : "Peter Campbell Smith"
},
{
- "id" : "PokGoPun",
+ "name" : "PokGoPun",
"data" : [
[
"Perl",
2
]
],
- "name" : "PokGoPun"
+ "id" : "PokGoPun"
},
{
- "name" : "Robert DiCicco",
"data" : [
[
"Perl",
@@ -237,10 +228,10 @@
2
]
],
- "id" : "Robert DiCicco"
+ "id" : "Robert DiCicco",
+ "name" : "Robert DiCicco"
},
{
- "id" : "Roger Bell_West",
"name" : "Roger Bell_West",
"data" : [
[
@@ -251,10 +242,10 @@
"Raku",
2
]
- ]
+ ],
+ "id" : "Roger Bell_West"
},
{
- "id" : "Ulrich Rieke",
"name" : "Ulrich Rieke",
"data" : [
[
@@ -265,11 +256,12 @@
"Raku",
2
]
- ]
+ ],
+ "id" : "Ulrich Rieke"
},
{
- "id" : "W. Luis Mochan",
"name" : "W. Luis Mochan",
+ "id" : "W. Luis Mochan",
"data" : [
[
"Perl",
@@ -282,5 +274,36 @@
]
}
]
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "subtitle" : {
+ "text" : "[Champions: 15] Last updated at 2022-02-23 08:24:39 GMT"
+ },
+ "tooltip" : {
+ "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/>"
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
+ "plotOptions" : {
+ "series" : {
+ "borderWidth" : 0,
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ }
+ }
+ },
+ "legend" : {
+ "enabled" : 0
+ },
+ "title" : {
+ "text" : "The Weekly Challenge - 153"
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 4889391264..c4a8976010 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,63 +1,63 @@
{
- "chart" : {
- "type" : "column"
- },
- "tooltip" : {
- "pointFormat" : "<b>{point.y:.0f}</b>"
- },
"yAxis" : {
+ "min" : 0,
"title" : {
"text" : null
- },
- "min" : 0
+ }
+ },
+ "subtitle" : {
+ "text" : "Last updated at 2022-02-23 08:24:39 GMT"
+ },
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
},
"xAxis" : {
- "type" : "category",
"labels" : {
"style" : {
- "fontFamily" : "Verdana, sans-serif",
- "fontSize" : "13px"
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
}
- }
+ },
+ "type" : "category"
+ },
+ "legend" : {
+ "enabled" : "false"
+ },
+ "title" : {
+ "text" : "The Weekly Challenge Contributions [2019 - 2022]"
+ },
+ "chart" : {
+ "type" : "column"
},
"series" : [
{
+ "name" : "Contributions",
"data" : [
[
"Blog",
- 2291
+ 2292
],
[
"Perl",
- 7347
+ 7349
],
[
"Raku",
- 4414
+ 4416
]
],
- "name" : "Contributions",
"dataLabels" : {
- "align" : "right",
"y" : 10,
- "enabled" : "true",
- "color" : "#FFFFFF",
"style" : {
"fontFamily" : "Verdana, sans-serif",
"fontSize" : "13px"
},
+ "align" : "right",
+ "enabled" : "true",
"rotation" : -90,
- "format" : "{point.y:.0f}"
+ "format" : "{point.y:.0f}",
+ "color" : "#FFFFFF"
}
}
- ],
- "title" : {
- "text" : "The Weekly Challenge Contributions [2019 - 2022]"
- },
- "legend" : {
- "enabled" : "false"
- },
- "subtitle" : {
- "text" : "Last updated at 2022-02-23 08:06:33 GMT"
- }
+ ]
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index 206a006d7f..b3a449dd26 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,9 +1,40 @@
{
+ "title" : {
+ "text" : "The Weekly Challenge Language"
+ },
+ "legend" : {
+ "enabled" : "false"
+ },
+ "plotOptions" : {
+ "series" : {
+ "borderWidth" : 0,
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ }
+ }
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
+ "tooltip" : {
+ "headerFormat" : "<span style=\"font-size:11px\"></span>",
+ "followPointer" : "true",
+ "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>"
+ },
+ "subtitle" : {
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2022-02-23 08:24:39 GMT"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
"drilldown" : {
"series" : [
{
- "id" : "001",
"name" : "001",
+ "id" : "001",
"data" : [
[
"Perl",
@@ -20,6 +51,7 @@
]
},
{
+ "name" : "002",
"data" : [
[
"Perl",
@@ -34,7 +66,6 @@
10
]
],
- "name" : "002",
"id" : "002"
},
{
@@ -56,7 +87,6 @@
"name" : "003"
},
{
- "id" : "004",
"name" : "004",
"data" : [
[
@@ -71,11 +101,10 @@
"Blog",
10
]
- ]
+ ],
+ "id" : "004"
},
{
- "id" : "005",
- "name" : "005",
"data" : [
[
"Perl",
@@ -89,10 +118,11 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "005",
+ "name" : "005"
},
{
- "id" : "006",
"data" : [
[
"Perl",
@@ -107,11 +137,12 @@
7
]
],
+ "id" : "006",
"name" : "006"
},
{
- "id" : "007",
"name" : "007",
+ "id" : "007",
"data" : [
[
"Perl",
@@ -128,6 +159,7 @@
]
},
{
+ "name" : "008",
"data" : [
[
"Perl",
@@ -142,11 +174,11 @@
12
]
],
- "name" : "008",
"id" : "008"
},
{
"name" : "009",
+ "id" : "009",
"data" : [
[
"Perl",
@@ -160,10 +192,11 @@
"Blog",
13
]
- ],
- "id" : "009"
+ ]
},
{
+ "name" : "010",
+ "id" : "010",
"data" : [
[
"Perl",
@@ -177,9 +210,7 @@
"Blog",
11
]
- ],
- "name" : "010",
- "id" : "010"
+ ]
},
{
"id" : "011",
@@ -214,10 +245,12 @@
11
]
],
- "name" : "012",
- "id" : "012"
+ "id" : "012",
+ "name" : "012"
},
{
+ "name" : "013",
+ "id" : "013",
"data" : [
[
"Perl",
@@ -231,12 +264,9 @@
"Blog",
13
]
- ],
- "name" : "013",
- "id" : "013"
+ ]
},
{
- "id" : "014",
"data" : [
[
"Perl",
@@ -251,9 +281,11 @@
15
]
],
+ "id" : "014",
"name" : "014"
},
{
+ "name" : "015",
"data" : [
[
"Perl",
@@ -268,10 +300,10 @@
15
]
],
- "name" : "015",
"id" : "015"
},
{
+ "name" : "016",
"data" : [
[
"Perl",
@@ -286,10 +318,11 @@
12
]
],
- "name" : "016",
"id" : "016"
},
{
+ "name" : "017",
+ "id" : "017",
"data" : [
[
"Perl",
@@ -303,12 +336,9 @@
"Blog",
12
]
- ],
- "name" : "017",
- "id" : "017"
+ ]
},
{
- "id" : "018",
"name" : "018",
"data" : [
[
@@ -323,7 +353,8 @@
"Blog",
14
]
- ]
+ ],
+ "id" : "018"
},
{
"id" : "019",
@@ -344,7 +375,6 @@
"name" : "019"
},
{
- "name" : "020",
"data" : [
[
"Perl",
@@ -359,9 +389,11 @@
13
]
],
- "id" : "020"
+ "id" : "020",
+ "name" : "020"
},
{
+ "id" : "021",
"data" : [
[
"Perl",
@@ -376,11 +408,9 @@
10
]
],
- "name" : "021",
- "id" : "021"
+ "name" : "021"
},
{
- "id" : "022",
"data" : [
[
"Perl",
@@ -395,9 +425,11 @@
10
]
],
+ "id" : "022",
"name" : "022"
},
{
+ "id" : "023",
"data" : [
[
"Perl",
@@ -412,8 +444,7 @@
12
]
],
- "name" : "023",
- "id" : "023"
+ "name" : "023"
},
{
"name" : "024",
@@ -448,11 +479,10 @@
12
]
],
- "name" : "025",
- "id" : "025"
+ "id" : "025",
+ "name" : "025"
},
{
- "name" : "026",
"data" : [
[
"Perl",
@@ -467,9 +497,11 @@
10
]
],
- "id" : "026"
+ "id" : "026",
+ "name" : "026"
},
{
+ "name" : "027",
"data" : [
[
"Perl",
@@ -484,11 +516,9 @@
9
]
],
- "name" : "027",
"id" : "027"
},
{
- "name" : "028",
"data" : [
[
"Perl",
@@ -503,9 +533,11 @@
9
]
],
- "id" : "028"
+ "id" : "028",
+ "name" : "028"
},
{
+ "name" : "029",
"data" : [
[
"Perl",
@@ -520,10 +552,10 @@
12
]
],
- "name" : "029",
"id" : "029"
},
{
+ "name" : "030",
"id" : "030",
"data" : [
[
@@ -538,12 +570,10 @@
"Blog",
10
]
- ],
- "name" : "030"
+ ]
},
{
"id" : "031",
- "name" : "031",
"data" : [
[
"Perl",
@@ -557,9 +587,11 @@
"Blog",
9
]
- ]
+ ],
+ "name" : "031"
},
{
+ "name" : "032",
"data" : [
[
"Perl",
@@ -574,11 +606,11 @@
10
]
],
- "name" : "032",
"id" : "032"
},
{
"name" : "033",
+ "id" : "033",
"data" : [
[
"Perl",
@@ -592,10 +624,10 @@
"Blog",
10
]
- ],
- "id" : "033"
+ ]
},
{
+ "name" : "034",
"data" : [
[
"Perl",
@@ -610,12 +642,10 @@
11
]
],
- "name" : "034",
"id" : "034"
},
{
"id" : "035",
- "name" : "035",
"data" : [
[
"Perl",
@@ -629,10 +659,10 @@
"Blog",
9
]
- ]
+ ],
+ "name" : "035"
},
{
- "id" : "036",
"data" : [
[
"Perl",
@@ -647,10 +677,11 @@
11
]
],
+ "id" : "036",
"name" : "036"
},
{
- "name" : "037",
+ "id" : "037",
"data" : [
[
"Perl",
@@ -665,10 +696,9 @@
9
]
],
- "id" : "037"
+ "name" : "037"
},
{
- "id" : "038",
"data" : [
[
"Perl",
@@ -683,10 +713,12 @@
12
]
],
+ "id" : "038",
"name" : "038"
},
{
"name" : "039",
+ "id" : "039",
"data" : [
[
"Perl",
@@ -700,10 +732,10 @@
"Blog",
12
]
- ],
- "id" : "039"
+ ]
},
{
+ "name" : "040",
"id" : "040",
"data" : [
[
@@ -718,8 +750,7 @@
"Blog",
10
]
- ],
- "name" : "040"
+ ]
},
{
"name" : "041",
@@ -740,6 +771,8 @@
"id" : "041"
},
{
+ "name" : "042",
+ "id" : "042",
"data" : [
[
"Perl",
@@ -753,12 +786,9 @@
"Blog",
11
]
- ],
- "name" : "042",
- "id" : "042"
+ ]
},
{
- "id" : "043",
"data" : [
[
"Perl",
@@ -773,10 +803,12 @@
11
]
],
+ "id" : "043",
"name" : "043"
},
{
"name" : "044",
+ "id" : "044",
"data" : [
[
"Perl",
@@ -790,10 +822,10 @@