From 0691e05a6750e20c750d46bb4488a574bb147d8a Mon Sep 17 00:00:00 2001 From: drbaggy Date: Wed, 21 Apr 2021 13:00:56 +0100 Subject: change the n-1 to n/2 or (rather n>>1) ~ 50% faster - approx 80K calcs per second for the for loop version --- challenge-109/james-smith/perl/ch-1.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenge-109/james-smith/perl/ch-1.pl b/challenge-109/james-smith/perl/ch-1.pl index 1b89226a6a..c7820fb3d2 100644 --- a/challenge-109/james-smith/perl/ch-1.pl +++ b/challenge-109/james-smith/perl/ch-1.pl @@ -19,7 +19,7 @@ is( chowla_for($_), $answer[ $_ ] ) foreach 1..20; done_testing(); ## We will quickly run benchmarking... -## This suggests the for loop to be approximately 40-50% +## This suggests the for loop to be approximately 40% ## faster than the map solution... ## It is also 9 characters shorter... @@ -30,15 +30,15 @@ cmpthese(1_000_000, { ## ## Rate Map For -## Map 38670/s -- -33% -## For 57670/s 49% -- +## Map 59524/s -- -26% +## For 79936/s 34% -- ## sub chowla_map { my ($t,$n) = (0,@_); ## First attempt - the one-liner is to write this as a map, ## we add $t at the end which is the value returned - ( map { (($n%$_) || ($t+=$_)) && () } 2..$n-1 ), $t; + ( map { (($n%$_) || ($t+=$_)) && () } 2..$n>>1 ), $t; } sub chowla_for { @@ -56,7 +56,7 @@ sub chowla_for { ## ($condition)||($fun()) ## * in perl `foreach` and `for` are synonymous - so we can shorten - ($n%$_)||($t+=$_) for 2..$n-1; + ($n%$_)||($t+=$_) for 2..$n>>1; ## Now a quick "shortening" - if there is no specific return ## statement - we can just omit the return in the last statement... -- cgit From 97ed1c6391ff0077df0c446603be46db1e6bf219 Mon Sep 17 00:00:00 2001 From: Adam Russell Date: Wed, 21 Apr 2021 19:51:47 -0400 Subject: initial commit --- challenge-109/adam-russell/blog.txt | 0 challenge-109/adam-russell/blog1.txt | 0 challenge-109/adam-russell/perl/ch-1.pl | 0 challenge-109/adam-russell/perl/ch-2.pl | 0 challenge-109/adam-russell/prolog/ch-1.p | 0 challenge-109/adam-russell/prolog/ch-2.p | 0 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 challenge-109/adam-russell/blog.txt create mode 100644 challenge-109/adam-russell/blog1.txt create mode 100644 challenge-109/adam-russell/perl/ch-1.pl create mode 100644 challenge-109/adam-russell/perl/ch-2.pl create mode 100644 challenge-109/adam-russell/prolog/ch-1.p create mode 100644 challenge-109/adam-russell/prolog/ch-2.p diff --git a/challenge-109/adam-russell/blog.txt b/challenge-109/adam-russell/blog.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-109/adam-russell/blog1.txt b/challenge-109/adam-russell/blog1.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-109/adam-russell/perl/ch-1.pl b/challenge-109/adam-russell/perl/ch-1.pl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-109/adam-russell/perl/ch-2.pl b/challenge-109/adam-russell/perl/ch-2.pl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-109/adam-russell/prolog/ch-1.p b/challenge-109/adam-russell/prolog/ch-1.p new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-109/adam-russell/prolog/ch-2.p b/challenge-109/adam-russell/prolog/ch-2.p new file mode 100644 index 0000000000..e69de29bb2 -- cgit From c08186dfa8428ca980a8c66f71731a06aa47a3f0 Mon Sep 17 00:00:00 2001 From: Adam Russell Date: Fri, 23 Apr 2021 10:49:09 -0400 Subject: Perl and Prolog solutions --- challenge-109/adam-russell/perl/ch-1.pl | 29 ++++++++++++++ challenge-109/adam-russell/perl/ch-2.pl | 61 +++++++++++++++++++++++++++++ challenge-109/adam-russell/prolog/ch-1.p | 42 ++++++++++++++++++++ challenge-109/adam-russell/prolog/ch-2.p | 66 ++++++++++++++++++++++++++++++++ 4 files changed, 198 insertions(+) diff --git a/challenge-109/adam-russell/perl/ch-1.pl b/challenge-109/adam-russell/perl/ch-1.pl index e69de29bb2..e5b82ec61f 100644 --- a/challenge-109/adam-russell/perl/ch-1.pl +++ b/challenge-109/adam-russell/perl/ch-1.pl @@ -0,0 +1,29 @@ +use strict; +use warnings; +## +# Write a script to generate first 20 Chowla Numbers. +# C(n) = sum of divisors of n except 1 and n +## +use constant CHOWLA_COUNT => 20; +sub factor{ + my($n) = @_; + my @factors = (); + foreach my $j (2..sqrt($n)){ + push @factors, $j if $n % $j == 0; + push @factors, ($n / $j) if $n % $j == 0 && $j ** 2 != $n; + } + return @factors; +} + +sub chowla{ + my(@factors) = @_; + my $sum = unpack("%32I*", pack("I*", @factors)); +} + +MAIN:{ + my @chowla_numbers; + for my $n (1 .. CHOWLA_COUNT){ + push @chowla_numbers, chowla(factor($n)); + } + print join(", ", @chowla_numbers) . "\n"; +} \ No newline at end of file diff --git a/challenge-109/adam-russell/perl/ch-2.pl b/challenge-109/adam-russell/perl/ch-2.pl index e69de29bb2..3278d340e3 100644 --- a/challenge-109/adam-russell/perl/ch-2.pl +++ b/challenge-109/adam-russell/perl/ch-2.pl @@ -0,0 +1,61 @@ +use strict; +use warnings; +## +# You are given four squares as below with numbers named a,b,c,d,e,f,g. +# to place the given unique numbers in the square box so that sum of +# numbers in each box is the same. +# (1) (3) +# +--------------+ +--------------+ +# ¦ ¦ ¦ ¦ +# ¦ a ¦ ¦ e ¦ +# ¦ ¦ (2) ¦ ¦ (4) +# ¦ +---+------+---+ +---+---------+ +# ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ +# ¦ ¦ b ¦ ¦ d ¦ ¦ f ¦ ¦ +# ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ +# ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ +# +----------+---+ +---+------+---+ ¦ +# ¦ c ¦ ¦ g ¦ +# ¦ ¦ ¦ ¦ +# ¦ ¦ ¦ ¦ +# +--------------+ +-------------+ +## +use AI::Prolog; + +my $prolog = do{ + local $/; + ; +}; +$prolog = new AI::Prolog($prolog); +$prolog->query("sums_in_squares([1,2,3,4,5,6,7], Squares)."); + +my $result; +while ($result = $prolog->results()){ + print join(",", @{$result->[2]}) . "\n"; +} + +__DATA__ +member(X,[X|T]). +member(X,[H|T]):- member(X,T). +sums_in_squares(Numbers, [A, B, C, D, E, F, G]):- + member(A, Numbers), + member(B, Numbers), + member(C, Numbers), + member(D, Numbers), + member(E, Numbers), + member(F, Numbers), + member(G, Numbers), + A \= B, A \= C, A \= D, A \= E, A \= F, A \= G, + B \= A, B \= C, B \= D, B \= E, B \= F, B \= G, + C \= A, C \= B, C \= D, C \= E, C \= F, C \= G, + D \= A, D \= B, D \= C, D \= E, D \= F, D \= G, + E \= A, E \= B, E \= C, E \= D, E \= F, E \= G, + F \= A, F \= B, F \= C, F \= D, F \= E, F \= G, + G \= A, G \= B, G \= C, G \= D, G \= E, G \= F, + Box1 is A + B, + Box2 is B + C + D, + Box3 is D + E + F, + Box4 is F + G, + Box1 == Box2, + Box2 == Box3, + Box3 == Box4. \ No newline at end of file diff --git a/challenge-109/adam-russell/prolog/ch-1.p b/challenge-109/adam-russell/prolog/ch-1.p index e69de29bb2..3e2458293b 100644 --- a/challenge-109/adam-russell/prolog/ch-1.p +++ b/challenge-109/adam-russell/prolog/ch-1.p @@ -0,0 +1,42 @@ +/* + Write a script to generate first 20 Chowla Numbers. + C(n) = sum of divisors of n except 1 and n +*/ + +:-initialization(main). + +print_with_comma([H|[]]):- + write(H), nl. +print_with_comma([H|T]):- + write(H), + write(', '), + print_with_comma(T). + +factor(N, Factors):- + S is round(sqrt(N)), + fd_domain(X, 2, S), + R #= N rem X, + R #= 0, + Q #= N // X, + Q #\= X, + fd_labeling([Q, X]), + Factors = [Q, X]. +factor(N, Factors):- + S is round(sqrt(N)), + fd_domain(X, 2, S), + R #= N rem X, + R #= 0, + Q #= N // X, + Q #= X, + fd_labeling([Q]), + Factors = [Q]. + +chowla(ChowlaNumber):- + between(1, 20, N), + findall(F, factor(N, F), Fs), + flatten(Fs, Factors), + sum_list(Factors, ChowlaNumber). + +main:- + findall(ChowlaNumber, chowla(ChowlaNumber), ChowlaNumbers), + print_with_comma(ChowlaNumbers). \ No newline at end of file diff --git a/challenge-109/adam-russell/prolog/ch-2.p b/challenge-109/adam-russell/prolog/ch-2.p index e69de29bb2..f56e7aa1a9 100644 --- a/challenge-109/adam-russell/prolog/ch-2.p +++ b/challenge-109/adam-russell/prolog/ch-2.p @@ -0,0 +1,66 @@ +/* + You are given four squares as below with numbers named a,b,c,d,e,f,g. + to place the given unique numbers in the square box so that sum of + numbers in each box is the same. + (1) (3) + +--------------+ +--------------+ + ¦ ¦ ¦ ¦ + ¦ a ¦ ¦ e ¦ + ¦ ¦ (2) ¦ ¦ (4) + ¦ +---+------+---+ +---+---------+ + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ + ¦ ¦ b ¦ ¦ d ¦ ¦ f ¦ ¦ + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ + +----------+---+ +---+------+---+ ¦ + ¦ c ¦ ¦ g ¦ + ¦ ¦ ¦ ¦ + ¦ ¦ ¦ ¦ + +--------------+ +-------------+ +*/ + +:-initialization(main). + +all_unique(_, []). +all_unique(L, [V|T]) :- + fd_exactly(1, L, V), + all_unique(L, T). + +sums_in_squares_naive(Numbers, [A, B, C, D, E, F, G]):- + member(A, Numbers), + member(B, Numbers), + member(C, Numbers), + member(D, Numbers), + member(E, Numbers), + member(F, Numbers), + member(G, Numbers), + \+ (A == B; A == C; A == D; A == E; A == F; A == G), + \+ (B == A; B == C; B == D; B == E; B == F; B == G), + \+ (C == A; C == B; C == D; C == E; C == F; C == G), + \+ (D == A; D == B; D == C; D == E; D == F; D == G), + \+ (E == A; E == B; E == C; E == D; E == F; E == G), + \+ (F == A; F == B; F == C; F == D; F == E; F == G), + \+ (G == A; G == B; G == C; G == D; G == E; G == F), + Box1 is A + B, + Box2 is B + C + D, + Box3 is D + E + F, + Box4 is F + G, + Box1 == Box2, + Box2 == Box3, + Box3 == Box4. + +sums_in_squares_fd(Numbers, [A, B, C, D, E, F, G]):- + fd_domain([A, B, C, D, E, F, G], Numbers), + all_unique([A, B, C, D, E, F, G], Numbers), + Box1 = A + B, + Box2 = B + C + D, + Box3 = D + E + F, + Box4 = F + G, + Box1 #= Box2, + Box2 #= Box3, + Box3 #= Box4, + fd_labeling([A, B, C, D, E, F, G]). + +main:- + setof(S, sums_in_squares_fd([1,2,3,4,5,6,7], S), Squares), + write(Squares). \ No newline at end of file -- cgit From 6d37a876a4d8fbd7f09d05ad436c24b0e4aee68a Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 25 Apr 2021 18:08:41 +0200 Subject: Blog post for week 109, part 2. --- challenge-109/abigail/README.md | 1 + challenge-109/abigail/blog1.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 challenge-109/abigail/blog1.txt diff --git a/challenge-109/abigail/README.md b/challenge-109/abigail/README.md index 6a72e49070..efca0f497f 100644 --- a/challenge-109/abigail/README.md +++ b/challenge-109/abigail/README.md @@ -103,4 +103,5 @@ Output: * [Ruby](ruby/ch-2.rb) ### Blog +[Four Squares Puzzle](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-109-2.html) diff --git a/challenge-109/abigail/blog1.txt b/challenge-109/abigail/blog1.txt new file mode 100644 index 0000000000..4e2e04a7f9 --- /dev/null +++ b/challenge-109/abigail/blog1.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-109-2.html -- cgit From b4ee212c0029aa0aedbefdf161fc9700349b236a Mon Sep 17 00:00:00 2001 From: Adam Russell Date: Sun, 25 Apr 2021 12:14:34 -0400 Subject: Perl and Prolog solutions, with blog links. --- challenge-109/adam-russell/blog.txt | 1 + challenge-109/adam-russell/blog1.txt | 1 + challenge-109/adam-russell/perl/ch-2.pl | 5 +++-- challenge-109/adam-russell/prolog/ch-2.p | 18 +++++++++++++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/challenge-109/adam-russell/blog.txt b/challenge-109/adam-russell/blog.txt index e69de29bb2..d6493ed274 100644 --- a/challenge-109/adam-russell/blog.txt +++ b/challenge-109/adam-russell/blog.txt @@ -0,0 +1 @@ +http://www.rabbitfarm.com/cgi-bin/blosxom/perl/2021/04/25 diff --git a/challenge-109/adam-russell/blog1.txt b/challenge-109/adam-russell/blog1.txt index e69de29bb2..fdf5d4d2ea 100644 --- a/challenge-109/adam-russell/blog1.txt +++ b/challenge-109/adam-russell/blog1.txt @@ -0,0 +1 @@ +http://www.rabbitfarm.com/cgi-bin/blosxom/prolog/2021/04/25 diff --git a/challenge-109/adam-russell/perl/ch-2.pl b/challenge-109/adam-russell/perl/ch-2.pl index 3278d340e3..3a57cfebd1 100644 --- a/challenge-109/adam-russell/perl/ch-2.pl +++ b/challenge-109/adam-russell/perl/ch-2.pl @@ -30,8 +30,9 @@ $prolog = new AI::Prolog($prolog); $prolog->query("sums_in_squares([1,2,3,4,5,6,7], Squares)."); my $result; +print join("\t", "a" .. "g") . "\n"; while ($result = $prolog->results()){ - print join(",", @{$result->[2]}) . "\n"; + print join("\t", @{$result->[2]}) . "\n"; } __DATA__ @@ -58,4 +59,4 @@ sums_in_squares(Numbers, [A, B, C, D, E, F, G]):- Box4 is F + G, Box1 == Box2, Box2 == Box3, - Box3 == Box4. \ No newline at end of file + Box3 == Box4. diff --git a/challenge-109/adam-russell/prolog/ch-2.p b/challenge-109/adam-russell/prolog/ch-2.p index f56e7aa1a9..3f7aafd6d6 100644 --- a/challenge-109/adam-russell/prolog/ch-2.p +++ b/challenge-109/adam-russell/prolog/ch-2.p @@ -21,6 +21,22 @@ :-initialization(main). +print_with_tab([H|[]]):- + write(H), nl. +print_with_tab([H|T]):- + write(H), + write('\t'), + print_with_tab(T). + +print_values([]). +print_values([H|T]):- + print_with_tab(H), + print_values(T). + +print_solutions(Solutions):- + print_with_tab([a, b, c, d, e, f, g]), + print_values(Solutions). + all_unique(_, []). all_unique(L, [V|T]) :- fd_exactly(1, L, V), @@ -63,4 +79,4 @@ sums_in_squares_fd(Numbers, [A, B, C, D, E, F, G]):- main:- setof(S, sums_in_squares_fd([1,2,3,4,5,6,7], S), Squares), - write(Squares). \ No newline at end of file + print_solutions(Squares). -- cgit From 895a9d76deaaebf7e0d63a3e2551b0c1fb1bcd11 Mon Sep 17 00:00:00 2001 From: k-mx Date: Mon, 26 Apr 2021 00:31:12 +0500 Subject: Challenge 109 part 2 by Maxim Kolodyazhny My first Raku solution :3 --- challenge-109/maxim-kolodyazhny/raku/ch-2.raku | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 challenge-109/maxim-kolodyazhny/raku/ch-2.raku diff --git a/challenge-109/maxim-kolodyazhny/raku/ch-2.raku b/challenge-109/maxim-kolodyazhny/raku/ch-2.raku new file mode 100755 index 0000000000..bc524a2fef --- /dev/null +++ b/challenge-109/maxim-kolodyazhny/raku/ch-2.raku @@ -0,0 +1,19 @@ +#!/usr/bin/env raku + +multi sub MAIN ( $_ where { /\,/ } ) { samewith .split: <,> } +multi sub MAIN ( $_ where { .unique and .all ~~ /^ \d+ $/ and .elems == 7 }) { + .permutations + .first({ + [==] .rotor( <2 -1 3 -1 3 -1>.pairup )>>.sum + }) + .say +} + +sub USAGE() { + print qq:to/EOH/; + Usage: {$*PROGRAM-NAME} [1,2,3...,7] + + Prints the answer for "Four Squares Puzzle" +EOH +} + -- cgit From 55ae7f26b8cd04e5866f34a87feedf1b97051991 Mon Sep 17 00:00:00 2001 From: arnesom Date: Sun, 25 Apr 2021 21:39:28 +0200 Subject: Arne Sommer --- challenge-109/arne-sommer/blog.txt | 1 + challenge-109/arne-sommer/perl/ch-1.pl | 36 +++++++++++++ challenge-109/arne-sommer/perl/ch-2.pl | 62 ++++++++++++++++++++++ challenge-109/arne-sommer/perl/chowla-numbers-perl | 36 +++++++++++++ .../arne-sommer/perl/four-squares-puzzle-perl | 62 ++++++++++++++++++++++ challenge-109/arne-sommer/raku/ch-1.raku | 32 +++++++++++ challenge-109/arne-sommer/raku/ch-2.raku | 39 ++++++++++++++ challenge-109/arne-sommer/raku/chowla-numbers | 32 +++++++++++ challenge-109/arne-sommer/raku/four-squares-puzzle | 39 ++++++++++++++ 9 files changed, 339 insertions(+) create mode 100644 challenge-109/arne-sommer/blog.txt create mode 100755 challenge-109/arne-sommer/perl/ch-1.pl create mode 100755 challenge-109/arne-sommer/perl/ch-2.pl create mode 100755 challenge-109/arne-sommer/perl/chowla-numbers-perl create mode 100755 challenge-109/arne-sommer/perl/four-squares-puzzle-perl create mode 100755 challenge-109/arne-sommer/raku/ch-1.raku create mode 100755 challenge-109/arne-sommer/raku/ch-2.raku create mode 100755 challenge-109/arne-sommer/raku/chowla-numbers create mode 100755 challenge-109/arne-sommer/raku/four-squares-puzzle diff --git a/challenge-109/arne-sommer/blog.txt b/challenge-109/arne-sommer/blog.txt new file mode 100644 index 0000000000..cf988cf442 --- /dev/null +++ b/challenge-109/arne-sommer/blog.txt @@ -0,0 +1 @@ +https://raku-musings.com/chowla-squared.html diff --git a/challenge-109/arne-sommer/perl/ch-1.pl b/challenge-109/arne-sommer/perl/ch-1.pl new file mode 100755 index 0000000000..178106e0ea --- /dev/null +++ b/challenge-109/arne-sommer/perl/ch-1.pl @@ -0,0 +1,36 @@ +#! /usr/bin/env perl + +use strict; +use warnings; +use feature 'say'; +use feature 'signatures'; +use List::Util 'sum'; + +no warnings "experimental::signatures"; + +my $limit = $ARGV[0] // 20; +my @chowla; + +for my $index (1 .. $limit) +{ + my @divisors = divisors($index, 1, 1); + + push(@chowla, (sum(@divisors) // 0)); +} + +say join(", ", @chowla); + + +sub divisors ($number, $not_self, $not_one) +{ + my @divisors; + + for my $candidate ( ($not_one ? 2 : 1) .. $number/2) + { + push(@divisors, $candidate) unless $number % $candidate; + } + + push(@divisors, $number) unless $not_self; + + return @divisors; +} diff --git a/challenge-109/arne-sommer/perl/ch-2.pl b/challenge-109/arne-sommer/perl/ch-2.pl new file mode 100755 index 0000000000..290329188b --- /dev/null +++ b/challenge-109/arne-sommer/perl/ch-2.pl @@ -0,0 +1,62 @@ +#! /usr/bin/env perl + +use strict; +use warnings; +use feature 'say'; +use feature 'signatures'; + +no warnings "experimental::signatures"; + +use Getopt::Long; +use Algorithm::Combinatorics 'permutations'; + +my $short = 0; +my $all = 0; + +GetOptions("short" => \$short, + "all" => \$all); + +$all = 1 if $short; + +my @values = @ARGV; + +for my $perm (permutations(\@values)) +{ + if (check_values(@$perm)) + { + my ($a, $b, $c, $d, $e, $f, $g) = @$perm; + if ($short) + { + say "a=$a, b=$b, c=$c, d=$d, e=$e, f=$f, g=$g"; + } + else + { + say "a = $a"; + say "b = $b"; + say "c = $c"; + say "d = $d"; + say "e = $e"; + say "f = $f"; + say "g = $g"; + say ""; + say "Box 1: a + b = $a + $b = " . ($a + $b); + say "Box 2: b + c + d = $b + $c + $d = " . ($b + $c + $d); + say "Box 3: d + e + f = $d + $e + $f = " . ($d + $e + $f); + say "Box 4: f + g = $f + $g = " . ($f + $g); + say "" if $all; + } + + last unless $all; + } +} + +sub check_values (@values) +{ + + my ($a, $b, $c, $d, $e, $f, $g) = @values; + my $box1 = $a + $b; + my $box2 = $b + $c + $d; + my $box3 = $d + $e + $f; + my $box4 = $f + $g; + return ($box1 == $box2 && $box3 == $box4 && $box1 == $box3) +} diff --git a/challenge-109/arne-sommer/perl/chowla-numbers-perl b/challenge-109/arne-sommer/perl/chowla-numbers-perl new file mode 100755 index 0000000000..178106e0ea --- /dev/null +++ b/challenge-109/arne-sommer/perl/chowla-numbers-perl @@ -0,0 +1,36 @@ +#! /usr/bin/env perl + +use strict; +use warnings; +use feature 'say'; +use feature 'signatures'; +use List::Util 'sum'; + +no warnings "experimental::signatures"; + +my $limit = $ARGV[0] // 20; +my @chowla; + +for my $index (1 .. $limit) +{ + my @divisors = divisors($index, 1, 1); + + push(@chowla, (sum(@divisors) // 0)); +} + +say join(", ", @chowla); + + +sub divisors ($number, $not_self, $not_one) +{ + my @divisors; + + for my $candidate ( ($not_one ? 2 : 1) .. $number/2) + { + push(@divisors, $candidate) unless $number % $candidate; + } + + push(@divisors, $number) unless $not_self; + + return @divisors; +} diff --git a/challenge-109/arne-sommer/perl/four-squares-puzzle-perl b/challenge-109/arne-sommer/perl/four-squares-puzzle-perl new file mode 100755 index 0000000000..290329188b --- /dev/null +++ b/challenge-109/arne-sommer/perl/four-squares-puzzle-perl @@ -0,0 +1,62 @@ +#! /usr/bin/env perl + +use strict; +use warnings; +use feature 'say'; +use feature 'signatures'; + +no warnings "experimental::signatures"; + +use Getopt::Long; +use Algorithm::Combinatorics 'permutations'; + +my $short = 0; +my $all = 0; + +GetOptions("short" => \$short, + "all" => \$all); + +$all = 1 if $short; + +my @values = @ARGV; + +for my $perm (permutations(\@values)) +{ + if (check_values(@$perm)) + { + my ($a, $b, $c, $d, $e, $f, $g) = @$perm; + if ($short) + { + say "a=$a, b=$b, c=$c, d=$d, e=$e, f=$f, g=$g"; + } + else + { + say "a = $a"; + say "b = $b"; + say "c = $c"; + say "d = $d"; + say "e = $e"; + say "f = $f"; + say "g = $g"; + say ""; + say "Box 1: a + b = $a + $b = " . ($a + $b); + say "Box 2: b + c + d = $b + $c + $d = " . ($b + $c + $d); + say "Box 3: d + e + f = $d + $e + $f = " . ($d + $e + $f); + say "Box 4: f + g = $f + $g = " . ($f + $g); + say "" if $all; + } + + last unless $all; + } +} + +sub check_values (@values) +{ + + my ($a, $b, $c, $d, $e, $f, $g) = @values; + my $box1 = $a + $b; + my $box2 = $b + $c + $d; + my $box3 = $d + $e + $f; + my $box4 = $f + $g; + return ($box1 == $box2 && $box3 == $box4 && $box1 == $box3) +} diff --git a/challenge-109/arne-sommer/raku/ch-1.raku b/challenge-109/arne-sommer/raku/ch-1.raku new file mode 100755 index 0000000000..e4ed2ed2d7 --- /dev/null +++ b/challenge-109/arne-sommer/raku/ch-1.raku @@ -0,0 +1,32 @@ +#! /usr/bin/env raku + +unit sub MAIN ($limit = 20, :v(:$verbose)); + +my $chowla := gather +{ + my $index = 1; + loop + { + my @divisors = divisors($index, :not-self, :not-one); + say "$index with divisors: { @divisors.join(", ") }" if $verbose; + + take @divisors.sum; + $index++; + } +} + +say $chowla[^$limit].join(", "); + +sub divisors ($number, :$not-self, :$not-one) +{ + my @divisors; + + for ($not-one ?? 2 !! 1) .. $number/2 -> $candidate + { + @divisors.push: $candidate if $number %% $candidate; + } + + @divisors.push: $number unless $not-self; + + return @divisors; +} diff --git a/challenge-109/arne-sommer/raku/ch-2.raku b/challenge-109/arne-sommer/raku/ch-2.raku new file mode 100755 index 0000000000..13276681aa --- /dev/null +++ b/challenge-109/arne-sommer/raku/ch-2.raku @@ -0,0 +1,39 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@values where @values.elems ==7 && all(@values) ~~ Numeric, :s(:$short), :a(:$all) = $short); + +for @values.permutations -> @perm +{ + if check-values(@perm) + { + if $short + { + say "a=@perm[0], b=@perm[1], c=@perm[2], d=@perm[3], e=@perm[4], f=@perm[5], g=@perm[6]"; + } + else + { + my ($a, $b, $c, $d, $e, $f, $g); + say "a = { $a = @perm[0] }"; + say "b = { $b = @perm[1] }"; + say "c = { $c = @perm[2] }"; + say "d = { $d = @perm[3] }"; + say "e = { $e = @perm[4] }"; + say "f = { $f = @perm[5] }"; + say "g = { $g = @perm[6] }"; + say ""; + say "Box 1: a + b = $a + $b = { $a + $b }"; + say "Box 2: b + c + d = $b + $c + $d = { $b + $c + $d }"; + say "Box 3: d + e + f = $d + $e + $f = { $d + $e + $f }"; + say "Box 4: f + g = $f + $g = { $f + $g }"; + say "" if $all; + } + + last unless $all; + } +} + +sub check-values (@values) +{ + my ($a, $b, $c, $d, $e, $f, $g) = @values; + return $a + $b == $b + $c + $d == $d + $e + $f == $f + $g; +} diff --git a/challenge-109/arne-sommer/raku/chowla-numbers b/challenge-109/arne-sommer/raku/chowla-numbers new file mode 100755 index 0000000000..e4ed2ed2d7 --- /dev/null +++ b/challenge-109/arne-sommer/raku/chowla-numbers @@ -0,0 +1,32 @@ +#! /usr/bin/env raku + +unit sub MAIN ($limit = 20, :v(:$verbose)); + +my $chowla := gather +{ + my $index = 1; + loop + { + my @divisors = divisors($index, :not-self, :not-one); + say "$index with divisors: { @divisors.join(", ") }" if $verbose; + + take @divisors.sum; + $index++; + } +} + +say $chowla[^$limit].join(", "); + +sub divisors ($number, :$not-self, :$not-one) +{ + my @divisors; + + for ($not-one ?? 2 !! 1) .. $number/2 -> $candidate + { + @divisors.push: $candidate if $number %% $candidate; + } + + @divisors.push: $number unless $not-self; + + return @divisors; +} diff --git a/challenge-109/arne-sommer/raku/four-squares-puzzle b/challenge-109/arne-sommer/raku/four-squares-puzzle new file mode 100755 index 0000000000..13276681aa --- /dev/null +++ b/challenge-109/arne-sommer/raku/four-squares-puzzle @@ -0,0 +1,39 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@values where @values.elems ==7 && all(@values) ~~ Numeric, :s(:$short), :a(:$all) = $short); + +for @values.permutations -> @perm +{ + if check-values(@perm) + { + if $short + { + say "a=@perm[0], b=@perm[1], c=@perm[2], d=@perm[3], e=@perm[4], f=@perm[5], g=@perm[6]"; + } + else + { + my ($a, $b, $c, $d, $e, $f, $g); + say "a = { $a = @perm[0] }"; + say "b = { $b = @perm[1] }"; + say "c = { $c = @perm[2] }"; + say "d = { $d = @perm[3] }"; + say "e = { $e = @perm[4] }"; + say "f = { $f = @perm[5] }"; + say "g = { $g = @perm[6] }"; + say ""; + say "Box 1: a + b = $a + $b = { $a + $b }"; + say "Box 2: b + c + d = $b + $c + $d = { $b + $c + $d }"; + say "Box 3: d + e + f = $d + $e + $f = { $d + $e + $f }"; + say "Box 4: f + g = $f + $g = { $f + $g }"; + say "" if $all; + } + + last unless $all; + } +} + +sub check-values (@values) +{ + my ($a, $b, $c, $d, $e, $f, $g) = @values; + return $a + $b == $b + $c + $d == $d + $e + $f == $f + $g; +} -- cgit From 21af05ca16a04a6a112a27ebc39b1e1cdb7c5c67 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Sun, 25 Apr 2021 21:05:34 +0100 Subject: - Added blog by Abigail. --- stats/pwc-current.json | 408 +-- stats/pwc-language-breakdown-summary.json | 40 +- stats/pwc-language-breakdown.json | 4312 ++++++++++++++--------------- stats/pwc-leaders.json | 720 ++--- stats/pwc-summary-1-30.json | 60 +- stats/pwc-summary-121-150.json | 106 +- stats/pwc-summary-151-180.json | 122 +- stats/pwc-summary-181-210.json | 32 +- stats/pwc-summary-211-240.json | 30 +- stats/pwc-summary-31-60.json | 28 +- stats/pwc-summary-61-90.json | 42 +- stats/pwc-summary-91-120.json | 126 +- stats/pwc-summary.json | 38 +- 13 files changed, 3032 insertions(+), 3032 deletions(-) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 18b53d4e82..9dcc02f55c 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,148 +1,4 @@ { - "title" : { - "text" : "Perl Weekly Challenge - 109" - }, - "series" : [ - { - "data" : [ - { - "y" : 3, - "name" : "Aaron Smith", - "drilldown" : "Aaron Smith" - }, - { - "drilldown" : "Abigail", - "name" : "Abigail", - "y" : 3 - }, - { - "drilldown" : "Athanasius", - "y" : 4, - "name" : "Athanasius" - }, - { - "y" : 5, - "name" : "Bartosz Jarzyna", - "drilldown" : "Bartosz Jarzyna" - }, - { - "y" : 3, - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby" - }, - { - "y" : 2, - "name" : "E. Choroba", - "drilldown" : "E. Choroba" - }, - { - "drilldown" : "Flavio Poletti", - "name" : "Flavio Poletti", - "y" : 4 - }, - { - "name" : "James Smith", - "y" : 2, - "drilldown" : "James Smith" - }, - { - "y" : 2, - "name" : "Jan Krnavek", - "drilldown" : "Jan Krnavek" - }, - { - "y" : 2, - "name" : "Joan Mimosinnet", - "drilldown" : "Joan Mimosinnet" - }, - { - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey", - "y" : 2 - }, - { - "y" : 2, - "name" : "Lance Wicks", - "drilldown" : "Lance Wicks" - }, - { - "drilldown" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld", - "y" : 5 - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 4 - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 - }, - { - "drilldown" : "Mohammad S Anwar", - "y" : 3, - "name" : "Mohammad S Anwar" - }, - { - "name" : "Niels van Dijke", - "y" : 2, - "drilldown" : "Niels van Dijke" - }, - { - "y" : 2, - "name" : "PJ Durai", - "drilldown" : "PJ Durai" - }, - { - "name" : "Philip Hood", - "y" : 2, - "drilldown" : "Philip Hood" - }, - { - "name" : "Roger Bell_West", - "y" : 5, - "drilldown" : "Roger Bell_West" - }, - { - "drilldown" : "Simon Green", - "name" : "Simon Green", - "y" : 2 - }, - { - "y" : 2, - "name" : "Simon Proctor", - "drilldown" : "Simon Proctor" - }, - { - "drilldown" : "Stuart Little", - "name" : "Stuart Little", - "y" : 4 - }, - { - "name" : "Ulrich Rieke", - "y" : 3, - "drilldown" : "Ulrich Rieke" - }, - { - "y" : 3, - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan" - }, - { - "drilldown" : "Wanderdoc", - "y" : 2, - "name" : "Wanderdoc" - } - ], - "name" : "Perl Weekly Challenge - 109", - "colorByPoint" : 1 - } - ], - "subtitle" : { - "text" : "[Champions: 26] Last updated at 2021-04-25 13:16:31 GMT" - }, "drilldown" : { "series" : [ { @@ -160,8 +16,6 @@ "id" : "Aaron Smith" }, { - "name" : "Abigail", - "id" : "Abigail", "data" : [ [ "Perl", @@ -169,13 +23,14 @@ ], [ "Blog", - 1 + 2 ] - ] + ], + "name" : "Abigail", + "id" : "Abigail" }, { "name" : "Athanasius", - "id" : "Athanasius", "data" : [ [ "Perl", @@ -185,9 +40,11 @@ "Raku", 2 ] - ] + ], + "id" : "Athanasius" }, { + "name" : "Bartosz Jarzyna", "data" : [ [ "Perl", @@ -202,10 +59,10 @@ 1 ] ], - "name" : "Bartosz Jarzyna", "id" : "Bartosz Jarzyna" }, { + "name" : "Dave Jacoby", "data" : [ [ "Perl", @@ -216,22 +73,21 @@ 1 ] ], - "name" : "Dave Jacoby", "id" : "Dave Jacoby" }, { + "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "name" : "E. Choroba", - "id" : "E. Choroba" + "name" : "E. Choroba" }, { - "name" : "Flavio Poletti", "id" : "Flavio Poletti", + "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -245,13 +101,13 @@ }, { "name" : "James Smith", - "id" : "James Smith", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "James Smith" }, { "data" : [ @@ -264,26 +120,27 @@ "id" : "Jan Krnavek" }, { + "id" : "Joan Mimosinnet", + "name" : "Joan Mimosinnet", "data" : [ [ "Raku", 2 ] - ], - "name" : "Joan Mimosinnet", - "id" : "Joan Mimosinnet" + ] }, { - "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey" }, { + "name" : "Lance Wicks", "data" : [ [ "Perl", @@ -294,10 +151,10 @@ 1 ] ], - "id" : "Lance Wicks", - "name" : "Lance Wicks" + "id" : "Lance Wicks" }, { + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -312,10 +169,10 @@ 1 ] ], - "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld" }, { + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -326,20 +183,20 @@ 2 ] ], - "name" : "Luca Ferrari", - "id" : "Luca Ferrari" + "name" : "Luca Ferrari" }, { "name" : "Mark Anderson", - "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson" }, { + "name" : "Mohammad S Anwar", "data" : [ [ "Perl", @@ -350,7 +207,6 @@ 1 ] ], - "name" : "Mohammad S Anwar", "id" : "Mohammad S Anwar" }, { @@ -364,26 +220,28 @@ "id" : "Niels van Dijke" }, { + "name" : "PJ Durai", "data" : [ [ "Raku", 2 ] ], - "id" : "PJ Durai", - "name" : "PJ Durai" + "id" : "PJ Durai" }, { + "name" : "Philip Hood", "data" : [ [ "Raku", 2 ] ], - "name" : "Philip Hood", "id" : "Philip Hood" }, { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -397,33 +255,29 @@ "Blog", 1 ] - ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + ] }, { + "id" : "Simon Green", "data" : [ [ "Perl", 2 ] ], - "id" : "Simon Green", "name" : "Simon Green" }, { + "id" : "Simon Proctor", "data" : [ [ "Raku", 2 ] ], - "id" : "Simon Proctor", "name" : "Simon Proctor" }, { - "id" : "Stuart Little", - "name" : "Stuart Little", "data" : [ [ "Perl", @@ -433,11 +287,11 @@ "Raku", 2 ] - ] + ], + "name" : "Stuart Little", + "id" : "Stuart Little" }, { - "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -447,9 +301,13 @@ "Raku", 2 ] - ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -459,48 +317,190 @@ "Blog", 1 ] - ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + ] }, { + "id" : "Wanderdoc", + "name" : "Wanderdoc", "data" : [ [ "Perl", 2 ] - ], - "id" : "Wanderdoc", - "name" : "Wanderdoc" + ] } ] }, - "chart" : { - "type" : "column" - }, "plotOptions" : { "series" : { - "borderWidth" : 0, "dataLabels" : { "enabled" : 1, "format" : "{point.y}" - } + }, + "borderWidth" : 0 } }, - "xAxis" : { - "type" : "category" - }, "legend" : { "enabled" : 0 }, - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
", - "followPointer" : 1 - }, "yAxis" : { "title" : { "text" : "Total Solutions" } + }, + "subtitle" : { + "text" : "[Champions: 26] Last updated at 2021-04-25 20:05:19 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "Perl Weekly Challenge - 109" + }, + "series" : [ + { + "name" : "Perl Weekly Challenge - 109", + "colorByPoint" : 1, + "data" : [ + { + "y" : 3, + "drilldown" : "Aaron Smith", + "name" : "Aaron Smith" + }, + { + "name" : "Abigail", + "y" : 4, + "drilldown" : "Abigail" + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" + }, + { + "name" : "Bartosz Jarzyna", + "drilldown" : "Bartosz Jarzyna", + "y" : 5 + }, + { + "name" : "Dave Jacoby", + "y" : 3, + "drilldown" : "Dave Jacoby" + }, + { + "y" : 2, + "drilldown" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "name" : "Flavio Poletti", + "y" : 4, + "drilldown" : "Flavio Poletti" + }, + { + "name" : "James Smith", + "y" : 2, + "drilldown" : "James Smith" + }, + { + "drilldown" : "Jan Krnavek", + "y" : 2, + "name" : "Jan Krnavek" + }, + { + "y" : 2, + "drilldown" : "Joan Mimosinnet", + "name" : "Joan Mimosinnet" + }, + { + "name" : "Jorg Sommrey", + "y" : 2, + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Lance Wicks", + "drilldown" : "Lance Wicks", + "y" : 2 + }, + { + "name" : "Laurent Rosenfeld", + "y" : 5, + "drilldown" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 4, + "name" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "name" : "Mohammad S Anwar", + "drilldown" : "Mohammad S Anwar", + "y" : 3 + }, + { + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke", + "y" : 2 + }, + { + "drilldown" : "PJ Durai", + "y" : 2, + "name" : "PJ Durai" + }, + { + "y" : 2, + "drilldown" : "Philip Hood", + "name" : "Philip Hood" + }, + { + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", + "y" : 5 + }, + { + "y" : 2, + "drilldown" : "Simon Green", + "name" : "Simon Green" + }, + { + "drilldown" : "Simon Proctor", + "y" : 2, + "name" : "Simon Proctor" + }, + { + "name" : "Stuart Little", + "y" : 4, + "drilldown" : "Stuart Little" + }, + { + "name" : "Ulrich Rieke", + "y" : 3, + "drilldown" : "Ulrich Rieke" + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + }, + { + "drilldown" : "Wanderdoc", + "y" : 2, + "name" : "Wanderdoc" + } + ] + } + ], + "tooltip" : { + "followPointer" : 1, + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index e9064c390f..0956936d7b 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,14 +1,13 @@ { - "subtitle" : { - "text" : "Last updated at 2021-04-25 13:16:31 GMT" + "tooltip" : { + "pointFormat" : "{point.y:.0f}" }, "series" : [ { - "name" : "Contributions", "data" : [ [ "Blog", - 1495 + 1496 ], [ "Perl", @@ -20,30 +19,34 @@ ] ], "dataLabels" : { - "rotation" : -90, - "y" : 10, "format" : "{point.y:.0f}", + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + }, "align" : "right", + "rotation" : -90, "enabled" : "true", - "color" : "#FFFFFF", - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } + "y" : 10, + "color" : "#FFFFFF" + }, + "name" : "Contributions" } ], - "title" : { - "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" - }, "yAxis" : { "title" : { "text" : null }, "min" : 0 }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" + }, + "subtitle" : { + "text" : "Last updated at 2021-04-25 20:05:19 GMT" }, "xAxis" : { "labels" : { @@ -56,8 +59,5 @@ }, "legend" : { "enabled" : "false" - }, - "chart" : { - "type" : "column" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 259ffdf73c..72779c890d 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,2001 +1,38 @@ { - "drilldown" : { - "series" : [ - { - "data" : [ - [ - "Perl", - 103 - ], - [ - "Raku", - 47 - ], - [ - "Blog", - 11 - ] - ], - "id" : "001", - "name" : "001" - }, - { - "id" : "002", - "name" : "002", - "data" : [ - [ - "Perl", - 79 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "name" : "003", - "id" : "003", - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "004", - "name" : "004", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "name" : "005", - "id" : "005", - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "id" : "006", - "name" : "006", - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 18 - ], - [ - "Blog", - 7 - ] - ] - }, - { - "name" : "007", - "id" : "007", - "data" : [ - [ - "Perl", - 31 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 12 - ] - ], - "name" : "008", - "id" : "008" - }, - { - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 13 - ] - ], - "id" : "009", - "name" : "009" - }, - { - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 11 - ] - ], - "id" : "010", - "name" : "010" - }, - { - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 10 - ] - ], - "id" : "011", - "name" : "011" - }, - { - "id" : "012", - "name" : "012", - "data" : [ - [ - "Perl", - 48 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "013", - "name" : "013", - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 25 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 15 - ] - ], - "name" : "014", - "id" : "014" - }, - { - "id" : "015", - "name" : "015", - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 15 - ] - ] - }, - { - "name" : "016", - "id" : "016", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "name" : "017", - "id" : "017" - }, - { - "name" : "018", - "id" : "018", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 14 - ] - ] - }, - { - "name" : "019", - "id" : "019", - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 13 - ] - ], - "name" : "020", - "id" : "020" - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ], - "id" : "021", - "name" : "021" - }, - { - "data" : [ - [ - "Perl", - 34 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ], - "id" : "022", - "name" : "022" - }, - { - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 12 - ] - ], - "id" : "023", - "name" : "023" - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 11 - ] - ], - "id" : "024", - "name" : "024" - }, - { - "id" : "025", - "name" : "025", - "data" : [ - [ - "Perl", - 28 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 29 - ], - [ - "Blog", - 10 - ] - ], - "id" : "026", - "name" : "026" - }, - { - "data" : [ - [ - "Perl", - 29 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ], - "id" : "027", - "name" : "027" - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 9 - ] - ], - "id" : "028", - "name" : "028" - }, - { - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "id" : "029", - "name" : "029" - }, - { - "name" : "030", - "id" : "030", - "data" : [ - [ - "Perl", - 74 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ], - "id" : "031", - "name" : "031" - }, - { - "name" : "032", - "id" : "032", - "data" : [ - [ - "Perl", - 57 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "033", - "name" : "033", - "data" : [ - [ - "Perl", - 62 - ], - [ - "Raku", - 38 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 30 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 11 - ] - ], - "id" : "034", - "name" : "034" - }, - { - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ], - "name" : "035", - "id" : "035" - }, - { - "id" : "036", - "name" : "036", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 34 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 9 - ] - ], - "name" : "037", - "id" : "037" - }, - { - "id" : "038", - "name" : "038", - "data" : [ - [ - "Perl", - 31 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "name" : "039", - "id" : "039", - "data" : [ - [ - "Perl", - 29 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "name" : "040", - "id" : "040", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "041", - "name" : "041", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "042", - "name" : "042", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "043", - "name" : "043", - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "044", - "name" : "044", - "data" : [ - [ - "Perl", - 41 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 35 - ], - [ - "Blog", - 11 - ] - ], - "id" : "045", - "name" : "045" - }, - { - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ], - "name" : "046", - "id" : "046" - }, - { - "data" : [ - [ - "Perl", - 43 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 10 - ] - ], - "id" : "047", - "name" : "047" - }, - { - "data" : [ - [ - "Perl", - 59 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 12 - ] - ], - "name" : "048", - "id" : "048" - }, - { - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "name" : "049", - "id" : "049" - }, - { - "data" : [ - [ - "Perl", -