diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-06-22 18:49:32 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-06-22 18:49:32 +0100 |
| commit | 1eb2ce7af6be94f2a5ea35ea843b1903dbcfac05 (patch) | |
| tree | f9e1262826f2b0d987152e82c25160d8027405f8 | |
| parent | 41c5dfc6960176a72ed5aeb109b5dfd6080b6a6e (diff) | |
| download | perlweeklychallenge-club-1eb2ce7af6be94f2a5ea35ea843b1903dbcfac05.tar.gz perlweeklychallenge-club-1eb2ce7af6be94f2a5ea35ea843b1903dbcfac05.tar.bz2 perlweeklychallenge-club-1eb2ce7af6be94f2a5ea35ea843b1903dbcfac05.zip | |
- Added solutions by Dario Mazzeo.
| -rwxr-xr-x | challenge-170/dario-mazzeo/perl/ch-1.pl | 11 | ||||
| -rwxr-xr-x | challenge-170/dario-mazzeo/perl/ch-2.pl | 61 | ||||
| -rw-r--r-- | stats/pwc-current.json | 289 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 60 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 2372 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 394 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 118 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 108 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 32 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 84 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 100 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 106 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 580 |
16 files changed, 2289 insertions, 2202 deletions
diff --git a/challenge-170/dario-mazzeo/perl/ch-1.pl b/challenge-170/dario-mazzeo/perl/ch-1.pl new file mode 100755 index 0000000000..eff3b86cec --- /dev/null +++ b/challenge-170/dario-mazzeo/perl/ch-1.pl @@ -0,0 +1,11 @@ +# THE WEEKLY CHALLENGE - 170
+# Task 1: Primorial Numbers
+# Autore: Dario Mazzeo
+
+my @primi=(1, 2, 3, 5, 7, 11, 13, 17, 19, 23);
+my $tmp=1;
+
+for (my $i=0; $i<10; $i++){
+ $tmp=$primi[$i]*$tmp;
+ print "$tmp\n";
+}
\ No newline at end of file diff --git a/challenge-170/dario-mazzeo/perl/ch-2.pl b/challenge-170/dario-mazzeo/perl/ch-2.pl new file mode 100755 index 0000000000..f651c36bf2 --- /dev/null +++ b/challenge-170/dario-mazzeo/perl/ch-2.pl @@ -0,0 +1,61 @@ +# THE WEEKLY CHALLENGE - 170
+# Task 2: Kronecker Product
+# Autore: Dario Mazzeo
+
+# Separare le righe della matrica con il carattere ";"
+my $inputA="1,2;3,4";
+my $inputB="5,6;7,8";
+
+# Esempio n. 2
+# $inputA="1,-4,7;-2,3,3";
+# $inputB="8,-9,-6,5;1,-3,-4,7;2,8,-8,-3;1,2,-5,-1";
+
+my %AB=();
+my @righeA=split(";", $inputA); my @colonneA=();
+my @righeB=(); my @colonneB=();
+my $rr=0; my $cc=0;
+
+foreach my $rigaA (@righeA){
+ @colonneA=split(",", $rigaA);
+ foreach my $colonnaA (@colonneA){
+ my $vettore=Moltiplica($colonnaA, $inputB);
+ @righeB=split(";",$vettore);
+ foreach my $rigaB (@righeB){
+ @colonneB=split(",",$rigaB);
+ foreach my $colonnaB (@colonneB){
+ $AB{"$rr-$cc"}=$colonnaB;
+ $cc++;
+ }
+ $rr++; $cc-=$#colonneB+1;
+ }
+ $rr-=$#righeB+1; $cc+=$#colonneB+1;
+ }
+ $rr+=$#righeB+1; $cc=0;
+}
+
+foreach my $r (0 .. ($#righeA+1)*($#righeB+1)){
+ foreach my $c (0 .. ($#colonneA+1)*($#colonneB+1)){
+ print $AB{"$r-$c"}." ";
+ }
+ print "\n";
+}
+
+exit;
+
+
+
+sub Moltiplica{
+my $mul=$_[0];
+my $arr=$_[1];
+my $tmp="";
+my $ss=1;
+
+my @valori=split(/[,;]/, $arr);
+my @separatori=split(/-?\d*/, $arr);
+foreach my $v (@valori){
+ $tmp.=($mul*$v).@separatori[$ss];
+ $ss++;
+}
+
+return $tmp;
+}
\ No newline at end of file diff --git a/stats/pwc-current.json b/stats/pwc-current.json index bb825098a2..f2a0ec9cfa 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,20 +1,146 @@ { - "chart" : { - "type" : "column" + "subtitle" : { + "text" : "[Champions: 16] Last updated at 2022-06-22 17:47:32 GMT" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "series" : [ + { + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 170", + "data" : [ + { + "name" : "Cheok-Yin Fung", + "y" : 2, + "drilldown" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Dario Mazzeo", + "y" : 2, + "name" : "Dario Mazzeo" + }, + { + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby", + "y" : 2 + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "drilldown" : "James Smith", + "name" : "James Smith", + "y" : 3 + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 8 + }, + { + "y" : 2, + "name" : "Marton Polgar", + "drilldown" : "Marton Polgar" + }, + { + "name" : "Matthew Neleigh", + "y" : 2, + "drilldown" : "Matthew Neleigh" + }, + { + "name" : "Niels van Dijke", + "y" : 2, + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "name" : "Robert DiCicco", + "y" : 2, + "drilldown" : "Robert DiCicco" + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "drilldown" : "Roger Bell_West", + "y" : 4, + "name" : "Roger Bell_West" + }, + { + "drilldown" : "Stephen G Lynn", + "name" : "Stephen G Lynn", + "y" : 4 + }, + { + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke", + "y" : 3 + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ] + } + ], + "title" : { + "text" : "The Weekly Challenge - 170" + }, + "legend" : { + "enabled" : 0 + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "xAxis" : { + "type" : "category" + }, + "tooltip" : { + "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/>", + "followPointer" : 1 }, "drilldown" : { "series" : [ { + "id" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] ], - "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung" }, { + "id" : "Dario Mazzeo", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Dario Mazzeo" + }, + { "id" : "Dave Jacoby", "data" : [ [ @@ -31,11 +157,12 @@ 2 ] ], - "id" : "E. Choroba", - "name" : "E. Choroba" + "name" : "E. Choroba", + "id" : "E. Choroba" }, { "id" : "James Smith", + "name" : "James Smith", "data" : [ [ "Perl", @@ -45,12 +172,10 @@ "Blog", 1 ] - ], - "name" : "James Smith" + ] }, { "name" : "Luca Ferrari", - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -60,40 +185,41 @@ "Blog", 6 ] - ] + ], + "id" : "Luca Ferrari" }, { - "id" : "Marton Polgar", "data" : [ [ "Raku", 2 ] ], - "name" : "Marton Polgar" + "name" : "Marton Polgar", + "id" : "Marton Polgar" }, { + "id" : "Matthew Neleigh", "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ], - "id" : "Matthew Neleigh" + ] }, { - "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], + "name" : "Niels van Dijke", "id" : "Niels van Dijke" }, { - "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -104,7 +230,7 @@ 1 ] ], - "id" : "Peter Campbell Smith" + "name" : "Peter Campbell Smith" }, { "name" : "Robert DiCicco", @@ -121,8 +247,8 @@ "id" : "Robert DiCicco" }, { - "name" : "Robert Ransbottom", "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", "data" : [ [ "Raku", @@ -145,7 +271,6 @@ "id" : "Roger Bell_West" }, { - "id" : "Stephen G Lynn", "data" : [ [ "Perl", @@ -156,11 +281,11 @@ 2 ] ], - "name" : "Stephen G Lynn" + "name" : "Stephen G Lynn", + "id" : "Stephen G Lynn" }, { "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -170,10 +295,10 @@ "Raku", 1 ] - ] + ], + "id" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", "id" : "W. Luis Mochan", "data" : [ [ @@ -184,122 +309,12 @@ "Blog", 1 ] - ] + ], + "name" : "W. Luis Mochan" } ] }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "xAxis" : { - "type" : "category" - }, - "subtitle" : { - "text" : "[Champions: 15] Last updated at 2022-06-22 17:41:45 GMT" - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "title" : { - "text" : "The Weekly Challenge - 170" - }, - "legend" : { - "enabled" : 0 - }, - "tooltip" : { - "followPointer" : 1, - "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/>" - }, - "series" : [ - { - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 170", - "data" : [ - { - "y" : 2, - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" - }, - { - "name" : "Dave Jacoby", - "y" : 2, - "drilldown" : "Dave Jacoby" - }, - { - "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 - }, - { - "drilldown" : "James Smith", - "y" : 3, - "name" : "James Smith" - }, - { - "name" : "Luca Ferrari", - "y" : 8, - "drilldown" : "Luca Ferrari" - }, - { - "drilldown" : "Marton Polgar", - "y" : 2, - "name" : "Marton Polgar" - }, - { - "drilldown" : "Matthew Neleigh", - "y" : 2, - "name" : "Matthew Neleigh" - }, - { - "drilldown" : "Niels van Dijke", - "y" : 2, - "name" : "Niels van Dijke" - }, - { - "drilldown" : "Peter Campbell Smith", - "y" : 3, - "name" : "Peter Campbell Smith" - }, - { - "drilldown" : "Robert DiCicco", - "y" : 2, - "name" : "Robert DiCicco" - }, - { - "drilldown" : "Robert Ransbottom", - "y" : 2, - "name" : "Robert Ransbottom" - }, - { - "y" : 4, - "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West" - }, - { - "y" : 4, - "drilldown" : "Stephen G Lynn", - "name" : "Stephen G Lynn" - }, - { - "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 3 - }, - { - "y" : 3, - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan" - } - ] - } - ] + "chart" : { + "type" : "column" + } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 0924fcdccc..e86f49d05f 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,28 +1,9 @@ { - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } - }, - "chart" : { - "type" : "column" + "subtitle" : { + "text" : "Last updated at 2022-06-22 17:47:32 GMT" }, "series" : [ { - "name" : "Contributions", - "dataLabels" : { - "align" : "right", - "format" : "{point.y:.0f}", - "enabled" : "true", - "y" : 10, - "color" : "#FFFFFF", - "rotation" : -90, - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } - }, "data" : [ [ "Blog", @@ -30,26 +11,39 @@ ], [ "Perl", - 8269 + 8271 ], [ "Raku", 4908 ] - ] + ], + "name" : "Contributions", + "dataLabels" : { + "y" : 10, + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + }, + "align" : "right", + "format" : "{point.y:.0f}", + "color" : "#FFFFFF", + "rotation" : -90, + "enabled" : "true" + } } ], - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2022]" - }, "legend" : { "enabled" : "false" }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2022]" }, - "subtitle" : { - "text" : "Last updated at 2022-06-22 17:41:45 GMT" + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } }, "xAxis" : { "labels" : { @@ -59,5 +53,11 @@ } }, "type" : "category" + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "chart" : { + "type" : "column" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 74c8d59825..ba12d7b3c0 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,897 +1,8 @@ { - "series" : [ - { - "name" : "The Weekly Challenge Languages", - "colorByPoint" : "true", - "data" : [ - { - "drilldown" : "001", - "y" : 161, - "name" : "#001" - }, - { - "drilldown" : "002", - "y" : 125, - "name" : "#002" - }, - { - "name" : "#003", - "y" : 83, - "drilldown" : "003" - }, - { - "drilldown" : "004", - "y" : 99, - "name" : "#004" - }, - { - "y" : 78, - "drilldown" : "005", - "name" : "#005" - }, - { - "drilldown" : "006", - "y" : 58, - "name" : "#006" - }, - { - "name" : "#007", - "y" : 64, - "drilldown" : "007" - }, - { - "drilldown" : "008", - "y" : 78, - "name" : "#008" - }, - { - "y" : 76, - "drilldown" : "009", - "name" : "#009" - }, - { - "drilldown" : "010", - "y" : 65, - "name" : "#010" - }, - { - "drilldown" : "011", - "y" : 85, - "name" : "#011" - }, - { - "name" : "#012", - "drilldown" : "012", - "y" : 89 - }, - { - "name" : "#013", - "y" : 85, - "drilldown" : "013" - }, - { - "name" : "#014", - "drilldown" : "014", - "y" : 101 - }, - { - "drilldown" : "015", - "y" : 99, - "name" : "#015" - }, - { - "y" : 71, - "drilldown" : "016", - "name" : "#016" - }, - { - "y" : 84, - "drilldown" : "017", - "name" : "#017" - }, - { - "name" : "#018", - "y" : 81, - "drilldown" : "018" - }, - { - "name" : "#019", - "drilldown" : "019", - "y" : 103 - }, - { - "name" : "#020", - "drilldown" : "020", - "y" : 101 - }, - { - "y" : 72, - "drilldown" : "021", - "name" : "#021" - }, - { - "name" : "#022", - "drilldown" : "022", - "y" : 68 - }, - { - "name" : "#023", - "y" : 97, - "drilldown" : "023" - }, - { - "name" : "#024", - "drilldown" : "024", - "y" : 75 - }, - { - "drilldown" : "025", - "y" : 59, - "name" : "#025" - }, - { - "name" : "#026", - "drilldown" : "026", - "y" : 74 - }, - { - "name" : "#027", - "y" : 62, - "drilldown" : "027" - }, - { - "name" : "#028", - "y" : 82, - "drilldown" : "028" - }, - { - "name" : "#029", - "drilldown" : "029", - "y" : 81 - }, - { - "drilldown" : "030", - "y" : 119, - "name" : "#030" - }, - { - "name" : "#031", - "drilldown" : "031", - "y" : 91 - }, - { - "name" : "#032", - "y" : 96, - "drilldown" : "032" - }, - { - "name" : "#033", - "drilldown" : "033", - "y" : 112 - }, - { - "name" : "#034", - "y" : 66, - "drilldown" : "034" - }, - { - "name" : "#035", - "drilldown" : "035", - "y" : 66 - }, - { - "name" : "#036", - "drilldown" : "036", - "y" : 70 - }, - { - "drilldown" : "037", - "y" : 69, - "name" : "#037" - }, - { - "y" : 70, - "drilldown" : "038", - "name" : "#038" - }, - { - "y" : 64, - "drilldown" : "039", - "name" : "#039" - }, - { - "y" : 75, - "drilldown" : "040", - "name" : "#040" - }, - { - "name" : "#041", - "drilldown" : "041", - "y" : 78 - }, - { - "name" : "#042", - "y" : 94, - "drilldown" : "042" - }, - { - "name" : "#043", - "drilldown" : "043", - "y" : 70 - }, - { - "name" : "#044", - "y" : 87, - "drilldown" : "044" - }, - { - "drilldown" : "045", - "y" : 98, - "name" : "#045" - }, - { - "name" : "#046", - "y" : 89, - "drilldown" : "046" - }, - { - "y" : 86, - "drilldown" : "047", - "name" : "#047" - }, - { - "name" : "#048", - "drilldown" : "048", - "y" : 110 - }, - { - "name" : "#049", - "drilldown" : "049", - "y" : 91 - }, - { - "drilldown" : "050", - "y" : 100, - "name" : "#050" - }, - { - "drilldown" : "051", - "y" : 91, - "name" : "#051" - }, - { - "name" : "#052", - "drilldown" : "052", - "y" : 93 - }, - { - "drilldown" : "053", - "y" : 103, - "name" : "#053" - }, - { - "y" : 105, - "drilldown" : "054", - "name" : "#054" - }, - { - "name" : "#055", - "drilldown" : "055", - "y" : 90 - }, - { - "drilldown" : "056", - "y" : 97, - "name" : "#056" - }, - { - "name" : "#057", - "drilldown" : "057", - "y" : 82 - }, - { - "drilldown" : "058", - "y" : 71, - "name" : "#058" - }, - { - "name" : "#059", - "y" : 91, - "drilldown" : "059" - }, - { - "drilldown" : "060", - "y" : 87, - "name" : "#060" - }, - { - "name" : "#061", - "drilldown" : "061", - "y" : 83 - }, - { - "name" : "#062", - "y" : 60, - "drilldown" : "062" - }, - { - "name" : "#063", - "y" : 91, - "drilldown" : "063" - }, - { - "drilldown" : "064", - "y" : 82, - "name" : "#064" - }, - { - "name" : "#065", - "drilldown" : "065", - "y" : 75 - }, - { - "name" : "#066", - "drilldown" : "066", - "y" : 86 - }, - { - "name" : "#067", - "y" : 92, - "drilldown" : "067" - }, - { - "y" : 77, - "drilldown" : "068", - "name" : "#068" - }, - { - "drilldown" : "069", - "y" : 85, - "name" : "#069" - }, - { - "drilldown" : "070", - "y" : 95, - "name" : "#070" - }, - { - "name" : "#071", - "drilldown" : "071", - "y" : 80 - }, - { - "y" : 114, - "drilldown" : "072", - "name" : "#072" - }, - { - "name" : "#073", - "drilldown" : "073", - "y" : 112 - }, - { - "y" : 117, - "drilldown" : "074", - "name" : "#074" - }, - { - "y" : 117, - "drilldown" : "075", - "name" : "#075" - }, - { - "name" : "#076", - "drilldown" : "076", - "y" : 101 - }, - { - "y" : 100, - "drilldown" : "077", - "name" : "#077" - }, - { - "drilldown" : "078", - "y" : 127, - "name" : "#078" - }, - { - "name" : "#079", - "y" : 122, - "drilldown" : "079" - }, - { - "name" : "#080", - "y" : 127, - "drilldown" : "080" - }, - { - "name" : "#081", - "y" : 114, - "drilldown" : "081" - }, - { - "y" : 114, - "drilldown" : "082", - "name" : "#082" - }, - { - "y" : 127, - "drilldown" : "083", - "name" : "#083" - }, - { - "y" : 119, - "drilldown" : "084", - "name" : "#084" - }, - { - "name" : "#085", - "drilldown" : "085", - "y" : 114 - }, - { - "name" : "#086", - "y" : 104, - "drilldown" : "086" - }, - { - "y" : 101, - "drilldown" : "087", - "name" : "#087" - }, - { - "drilldown" : "088", - "y" : 121, - "name" : "#088" - }, - { - "name" : "#089", - "y" : 113, - "drilldown" : "089" - }, - { - "name" : "#090", - "drilldown" : "090", - "y" : 113 - }, - { - "drilldown" : "091", - "y" : 108, - "name" : "#091" - }, - { - "name" : "#092", - "drilldown" : "092", - "y" : 98 - }, - { - "name" : "#093", - "y" : 87, - "drilldown" : "093" - }, - { - "name" : "#094", - "y" : 87, - "drilldown" : "094" - }, - { - "name" : "#095", - "drilldown" : "095", - "y" : 108 |
