diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-07-24 21:04:25 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-07-24 21:04:25 +0100 |
| commit | 9aad0eab79918d8fca286e666253856e17382a06 (patch) | |
| tree | 14e6c3945de8022d06007dd101263a1bcae63e03 | |
| parent | 947f40794c2bc7d409f6b55464411f6d812b5f98 (diff) | |
| download | perlweeklychallenge-club-9aad0eab79918d8fca286e666253856e17382a06.tar.gz perlweeklychallenge-club-9aad0eab79918d8fca286e666253856e17382a06.tar.bz2 perlweeklychallenge-club-9aad0eab79918d8fca286e666253856e17382a06.zip | |
- Added solution by Colin Crain.
| -rwxr-xr-x | challenge-174/colin-crain/perl/ch-1.pl | 93 | ||||
| -rw-r--r-- | stats/pwc-current.json | 475 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 64 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 2468 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 744 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 116 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 116 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 46 |
15 files changed, 2378 insertions, 2270 deletions
diff --git a/challenge-174/colin-crain/perl/ch-1.pl b/challenge-174/colin-crain/perl/ch-1.pl new file mode 100755 index 0000000000..0c6ac953b5 --- /dev/null +++ b/challenge-174/colin-crain/perl/ch-1.pl @@ -0,0 +1,93 @@ +#!/Users/colincrain/perl5/perlbrew/perls/perl-5.32.0/bin/perl
+#
+# disarmed-and-disoriented.pl
+#
+# Disarium Numbers
+# Submitted by: Mohammad S Anwar
+# Write a script to generate first 19 Disarium Numbers.
+#
+
+# A disarium number is an integer where the sum of each digit
+# raised to the power of its position in the number, is equal to
+# the number.
+#
+#
+# For example,
+#
+# 518 is a disarium number
+# as (5 ** 1) + (1 ** 2) + (8 ** 3) => 5 + 1 + 512 => 518
+
+
+# method:
+#
+# This is a really unusual take on what I regard as an already
+# unusual activity, that is reassigning value to the digits
+# that compose a number based on their position.
+#
+# Commonly this goes one way, removing the positional
+# information and summing hte remaining digits as their
+# independant values. In this case we are performing an
+# incantation on each digit again, considered as an independant
+# number in itself, but also raised to a power derived from its
+# positional information. But wait, get this: the positional
+# information is a counted value read left-to-right, starting
+# at 1. So the one's place has the higest value, and the
+# rightmost, highest decimal postion is given 1. Oh, and then,
+# I almost forgot, we're going to sum the result.
+#
+# Honestly relating numerical meaning to the way a number is
+# written by arcane rules that aren't the same as standard
+# notation is really getting into the realm of magick. Next
+# we're going to double the value if it's written in Helvetica,
+# and halve it if it's Lucidia Grande.
+#
+# Am I being unnecesarily cranky? It's just that without any
+# context these excursions do seem rather arbitrary. Read
+# right-to-left the exponent would be the same as that in the
+# decimal multiplier, and in that case we are applyihg the
+# exponent to the digit instead of 10. That's weird enough but
+# is in essence one change: making the decimal expansion
+# different in a defined way.
+#
+# But reading from left-to-right, indexed from 1, seems quite
+# arbitrarily different. I can't relate that to anything. I am
+# very curious how Disarium came to this conclusion, that this
+# is what he wanted to do.
+
+# Note that the definition does not say positive integer, but
+# just integer, so I will take that as inclusive of 0, but not
+# negative numbers as I would have no idea how to handle the
+# negation sign. Does it hold a position ion this arbitrary
+# scheme? There is no guidance because the position seems based
+# on strings or text not numbers.
+#
+# © 2022 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+
+use warnings;
+use strict;
+use utf8;
+use feature ":5.26";
+use feature qw(signatures);
+no warnings 'experimental::signatures';
+
+my $res;
+my $test = 0;
+my @dis = ();
+
+while (@dis < 19) {
+ $res = disarium($test);
+ push @dis, $test if $res == $test;
+ $test++;
+}
+
+say $_ for @dis;
+
+sub disarium ($num, $sum = 0) {
+ $sum += (substr $num, $_-1, 1) ** $_ for (1..length $num);
+ $sum;
+}
+
+
diff --git a/stats/pwc-current.json b/stats/pwc-current.json index fecfb428bd..c87a21f17c 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,17 +1,194 @@ { + "subtitle" : { + "text" : "[Champions: 30] Last updated at 2022-07-24 19:57:50 GMT" + }, + "series" : [ + { + "data" : [ + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 2, + "drilldown" : "Athanasius" + }, + { + "name" : "Cheok-Yin Fung", + "y" : 2, + "drilldown" : "Cheok-Yin Fung" + }, + { + "name" : "Colin Crain", + "y" : 1, + "drilldown" : "Colin Crain" + }, + { + "name" : "Dario Mazzeo", + "y" : 1, + "drilldown" : "Dario Mazzeo" + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "y" : 7, + "name" : "Flavio Poletti", + "drilldown" : "Flavio Poletti" + }, + { + "name" : "Gurunandan Bhat", + "y" : 2, + "drilldown" : "Gurunandan Bhat" + }, + { + "name" : "James Smith", + "y" : 3, + "drilldown" : "James Smith" + }, + { + "drilldown" : "Jan Krnavek", + "y" : 2, + "name" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "y" : 2, + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Kjetil Skotheim", + "y" : 2, + "drilldown" : "Kjetil Skotheim" + }, + { + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "y" : 3 + }, + { + "name" : "Lubos Kolouch", + "y" : 2, + "drilldown" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "y" : 8, + "drilldown" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "name" : "Mohammad S Anwar", + "y" : 4, + "drilldown" : "Mohammad S Anwar" + }, + { + "name" : "Nicolas Mendoza", + "y" : 1, + "drilldown" : "Nicolas Mendoza" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "drilldown" : "Philippe Bricout", + "name" : "Philippe Bricout", + "y" : 1 + }, + { + "y" : 2, + "name" : "PokGoPun", + "drilldown" : "PokGoPun" + }, + { + "name" : "Robert DiCicco", + "y" : 3, + "drilldown" : "Robert DiCicco" + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "name" : "Simon Green", + "y" : 2, + "drilldown" : "Simon Green" + }, + { + "drilldown" : "Simon Proctor", + "y" : 1, + "name" : "Simon Proctor" + }, + { + "drilldown" : "Stephen G Lynn", + "y" : 5, + "name" : "Stephen G Lynn" + }, + { + "drilldown" : "Steven Wilson", + "y" : 1, + "name" : "Steven Wilson" + }, + { + "y" : 3, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ], + "name" : "The Weekly Challenge - 174", + "colorByPoint" : 1 + } + ], + "xAxis" : { + "type" : "category" + }, + "legend" : { + "enabled" : 0 + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "The Weekly Challenge - 174" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "plotOptions" : { "series" : { + "borderWidth" : 0, "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 + "enabled" : 1, + "format" : "{point.y}" + } } }, "drilldown" : { "series" : [ { - "id" : "Arne Sommer", "data" : [ [ "Raku", @@ -22,7 +199,8 @@ 1 ] ], - "name" : "Arne Sommer" + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { "name" : "Athanasius", @@ -39,37 +217,48 @@ ] }, { - "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] ], - "id" : "Cheok-Yin Fung" + "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" }, { - "name" : "Dario Mazzeo", "data" : [ [ "Perl", 1 ] ], - "id" : "Dario Mazzeo" + "name" : "Colin Crain", + "id" : "Colin Crain" + }, + { + "name" : "Dario Mazzeo", + "id" : "Dario Mazzeo", + "data" : [ + [ + "Perl", + 1 + ] + ] }, { - "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "id" : "E. Choroba" + "id" : "E. Choroba", + "name" : "E. Choroba" }, { "id" : "Flavio Poletti", + "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -83,21 +272,19 @@ "Blog", 3 ] - ], - "name" : "Flavio Poletti" + ] }, { "id" : "Gurunandan Bhat", + "name" : "Gurunandan Bhat", "data" : [ [ "Perl", 2 ] - ], - "name" : "Gurunandan Bhat" + ] }, { - "id" : "James Smith", "data" : [ [ "Perl", @@ -108,7 +295,8 @@ 1 ] ], - "name" : "James Smith" + "name" : "James Smith", + "id" : "James Smith" }, { "data" : [ @@ -121,28 +309,26 @@ "name" : "Jan Krnavek" }, { - "name" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] ], - "id" : "Jorg Sommrey" + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" }, { - "name" : "Kjetil Skotheim", - "id" : "Kjetil Skotheim", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Kjetil Skotheim", + "id" : "Kjetil Skotheim" }, { - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -156,19 +342,22 @@ "Blog", 1 ] - ] + ], + "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld" }, { - "name" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] ], + "name" : "Lubos Kolouch", "id" : "Lubos Kolouch" }, { + "name" : "Luca Ferrari", "id" : "Luca Ferrari", "data" : [ [ @@ -179,31 +368,31 @@ "Blog", 6 ] - ], - "name" : "Luca Ferrari" + ] }, { + "name" : "Mark Anderson", + "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ], - "id" : "Mark Anderson", - "name" : "Mark Anderson" + ] }, { + "id" : "Matthew Neleigh", "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ], - "id" : "Matthew Neleigh" + ] }, { "id" : "Mohammad S Anwar", + "name" : "Mohammad S Anwar", "data" : [ [ "Perl", @@ -213,12 +402,11 @@ "Raku", 2 ] - ], - "name" : "Mohammad S Anwar" + ] }, { - "name" : "Nicolas Mendoza", "id" : "Nicolas Mendoza", + "name" : "Nicolas Mendoza", "data" : [ [ "Perl", @@ -228,6 +416,7 @@ }, { "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -237,8 +426,7 @@ "Blog", 1 ] - ], - "name" : "Peter Campbell Smith" + ] }, { "name" : "Philippe Bricout", @@ -251,14 +439,14 @@ ] }, { + "name" : "PokGoPun", + "id" : "PokGoPun", "data" : [ [ "Perl", 2 ] - ], - "id" : "PokGoPun", - "name" : "PokGoPun" + ] }, { "data" : [ @@ -271,11 +459,10 @@ 2 ] ], - "id" : "Robert DiCicco", - "name" : "Robert DiCicco" + "name" : "Robert DiCicco", + "id" : "Robert DiCicco" }, { - "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -290,10 +477,10 @@ 1 ] ], + "id" : "Roger Bell_West", "name" : "Roger Bell_West" }, { - "name" : "Simon Green", "data" : [ [ "Perl", @@ -304,17 +491,18 @@ 1 ] ], + "name" : "Simon Green", "id" : "Simon Green" }, { - "name" : "Simon Proctor", - "id" : "Simon Proctor", "data" : [ [ "Raku", 1 ] - ] + ], + "id" : "Simon Proctor", + "name" : "Simon Proctor" }, { "data" : [ @@ -335,17 +523,16 @@ "name" : "Stephen G Lynn" }, { - "name" : "Steven Wilson", "data" : [ [ "Perl", 1 ] ], - "id" : "Steven Wilson" + "id" : "Steven Wilson", + "name" : "Steven Wilson" }, { - "name" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -356,10 +543,12 @@ 1 ] ], - "id" : "Ulrich Rieke" + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke" }, { "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -369,187 +558,13 @@ "Blog", 1 ] - ], - "name" : "W. Luis Mochan" + ] } ] }, - "legend" : { - "enabled" : 0 - }, - "xAxis" : { - "type" : "category" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "subtitle" : { - "text" : "[Champions: 29] Last updated at 2022-07-24 19:21:44 GMT" - }, - "title" : { - "text" : "The Weekly Challenge - 174" - }, "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/>" - }, - "series" : [ - { - "data" : [ - { - "y" : 3, - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "y" : 2, - "drilldown" : "Athanasius", - "name" : "Athanasius" - }, - { - "y" : 2, - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" - }, - { - "y" : 1, - "drilldown" : "Dario Mazzeo", - "name" : "Dario Mazzeo" - }, - { - "y" : 2, - "drilldown" : "E. Choroba", - "name" : "E. Choroba" - }, - { - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti", - "y" : 7 - }, - { - "name" : "Gurunandan Bhat", - "drilldown" : "Gurunandan Bhat", - "y" : 2 - }, - { - "drilldown" : "James Smith", - "name" : "James Smith", - "y" : 3 - }, - { - "y" : 2, - "name" : "Jan Krnavek", - "drilldown" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Kjetil Skotheim", - "name" : "Kjetil Skotheim" - }, - { - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld", - "y" : 3 - }, - { - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch", - "y" : 2 - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 8 - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 - }, - { - "y" : 2, - "name" : "Matthew Neleigh", - "drilldown" : "Matthew Neleigh" - }, - { - "drilldown" : "Mohammad S Anwar", - "name" : "Mohammad S Anwar", - "y" : 4 - }, - { - "y" : 1, - "name" : "Nicolas Mendoza", - "drilldown" : "Nicolas Mendoza" - }, - { - "name" : "Peter Campbell Smith", - "drilldown" : "Peter Campbell Smith", - "y" : 3 - }, - { - "drilldown" : "Philippe Bricout", - "name" : "Philippe Bricout", - "y" : 1 - }, - { - "name" : "PokGoPun", - "drilldown" : "PokGoPun", - "y" : 2 - }, - { - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco", - "y" : 3 - }, - { - "y" : 5, - "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West" - }, - { - "y" : 2, - "drilldown" : "Simon Green", - "name" : "Simon Green" - }, - { - "name" : "Simon Proctor", - "drilldown" : "Simon Proctor", - "y" : 1 - }, - { - "drilldown" : "Stephen G Lynn", - "name" : "Stephen G Lynn", - "y" : 5 - }, - { - "name" : "Steven Wilson", - "drilldown" : "Steven Wilson", - "y" : 1 - }, - { - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke", - "y" : 3 - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 174" - } - ], - "chart" : { - "type" : "column" + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index e8f9b751a1..a802a39e11 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,23 +1,47 @@ { + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2022]" + }, + "yAxis" : { + "title" : { + "text" : null + }, + "min" : 0 + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, "legend" : { "enabled" : "false" }, "chart" : { "type" : "column" }, + "subtitle" : { + "text" : "Last updated at 2022-07-24 19:57:50 GMT" + }, "series" : [ { "dataLabels" : { - "y" : 10, + "rotation" : -90, "enabled" : "true", "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" }, - "align" : "right", + "y" : 10, + "format" : "{point.y:.0f}", "color" : "#FFFFFF", - "rotation" : -90, - "format" : "{point.y:.0f}" + "align" : "right" }, "name" : "Contributions", "data" : [ @@ -27,7 +51,7 @@ ], [ "Perl", - 8487 + 8488 ], [ "Raku", @@ -35,29 +59,5 @@ ] ] } - ], - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2022]" - }, - "subtitle" : { - "text" : "Last updated at 2022-07-24 19:21:44 GMT" - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } - } - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - } + ] } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 8ea7483e86..cef248f10d 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,10 +1,916 @@ { + "xAxis" : { + "type" : "category" + }, "legend" : { "enabled" : "false" }, + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2022-07-24 19:57:50 GMT" + }, + "series" : [ + { + "name" : "The Weekly Challenge Languages", + "colorByPoint" : "true", + "data" : [ + { + "y" : 161, + "name" : "#001", + "drilldown" : "001" + }, + { + "name" : "#002", + "y" : 125, + "drilldown" : "002" + }, + { + "drilldown" : "003", + "name" : "#003", + "y" : 83 + }, + { + "name" : "#004", + "y" : 99, + "drilldown" : "004" + }, + { + "drilldown" : "005", + "name" : "#005", + "y" : 78 + }, + { + "y" : 58, + "name" : "#006", + "drilldown" : "006" + }, + { + "drilldown" : "007", + "name" : "#007", + "y" : 65 + }, + { + "name" : "#008", + "y" : 78, + "drilldown" : "008" + }, + { + "y" : 76, + "name" : "#009", + "drilldown" : "009" + }, + { + "drilldown" : "010", + "y" : 65, + "name" : "#010" + }, + { + "name" : "#011", + "y" : 85, + "drilldown" : "011" + }, + { + "name" : "#012", + "y" : 89, + "drilldown" : "012" + }, + { + "drilldown" : "013", + "y" : 85, + "name" : "#013" + }, + { + "drilldown" : "014", + "name" : "#014", + "y" : 101 + }, + { + "name" : "#015", + "y" : 99, + "drilldown" : "015" + }, + { + "name" : "#016", + "y" : 71, + "drilldown" : "016" + }, + { + "y" : 84, + "name" : "#017", + "drilldown" : "017" + }, + { + "y" : 81, + "name" : "#018", + "drilldown" : "018" + }, + { + "drilldown" : "019", + "y" : 103, + "name" : "#019" + }, + { + "name" : "#020", + "y" : 101, + "drilldown" : "020" + }, + { + "y" : 72, + "name" : "#021", + "drilldown" : "021" + }, + { + "name" : "#022", + "y" : 68, + "drilldown" : "022" |
