From 67d2e3a9f14c7e969a3952bed7e01ecbb852dd12 Mon Sep 17 00:00:00 2001 From: rir Date: Thu, 30 Jan 2025 22:51:27 -0500 Subject: 306 --- challenge-306/0rir/raku/ch-1.raku | 56 +++++++++++++++++++++++++ challenge-306/0rir/raku/ch-2.raku | 86 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 challenge-306/0rir/raku/ch-1.raku create mode 100644 challenge-306/0rir/raku/ch-2.raku diff --git a/challenge-306/0rir/raku/ch-1.raku b/challenge-306/0rir/raku/ch-1.raku new file mode 100644 index 0000000000..f6d1937fa5 --- /dev/null +++ b/challenge-306/0rir/raku/ch-1.raku @@ -0,0 +1,56 @@ +#!/usr/bin/env raku +# :vim ft=raku sw=4 expandtab # 🦋 ∅∪∩∋∈∉⊆ ≡ ≢ «␤ » ∴ +use v6.d; +use Test; + +=begin comment +306-1: Odd Sum Submitted by: Mohammad Sajid Anwar +You are given an array of positive integers, @ints. +Write a script to return the sum of all possible odd-length subarrays of the given array. A subarray is a contiguous subsequence of the array. + +Example 1 +Input: @ints = (2, 5, 3, 6, 4) +Output: 77 + +Odd length sub-arrays: +(2) => 2 +(5) => 5 +(3) => 3 +(6) => 6 +(4) => 4 +(2, 5, 3) => 10 +(5, 3, 6) => 14 +(3, 6, 4) => 13 +(2, 5, 3, 6, 4) => 20 + +Sum => 2 + 5 + 3 + 6 + 4 + 10 + 14 + 13 + 20 => 77 +Example 2 +Input: @ints = (1, 3) +Output: 4 +=end comment + +my @Test = + 77, (2, 5, 3, 6, 4), + 4, (1, 3), + 4, (4,), + 0, (), +; + +plan @Test ÷ 2; + +multi task( [] ) { 0 } +multi task( @a --> Int) { + sum do for 1, *+2 … @a % 2 ?? +@a !! @a -1 { + @a.rotor($_ => -$_ +1 ).flat.sum; + } +} + +for @Test -> $exp, @in { + is task( @in), $exp, "{$exp // $exp.^name()} <- @in.raku()" +} +done-testing; + +my @int = (2, 5, 3, 6, 4, 10); +say "\nInput: @int = @int[]\nOutput: ", task( @int); + + diff --git a/challenge-306/0rir/raku/ch-2.raku b/challenge-306/0rir/raku/ch-2.raku new file mode 100644 index 0000000000..ade054fab6 --- /dev/null +++ b/challenge-306/0rir/raku/ch-2.raku @@ -0,0 +1,86 @@ +#!/usr/bin/env raku +# :vim ft=raku sw=4 expandtab # 🦋 ∅∪∩∋∈∉⊆ ≡ ≢ «␤ » ∴ +use v6.d; +use Test; + +=begin comment +Task 2: Last Element +Submitted by: Mohammad Sajid Anwar +You are given a array of integers, @ints. + +Write a script to play a game where you pick two biggest integers in the given array, say x and y. Then do the following: + +a) if x == y then remove both from the given array +b) if x != y then remove x and replace y with (y - x) +At the end of the game, there is at most one element left. + +Return the last element if found otherwise return 0. + +Example 1 +Input: @ints = (3, 8, 5, 2, 9, 2) +Output: 1 + +Step 1: pick 8 and 9 => (3, 5, 2, 1, 2) +Step 2: pick 3 and 5 => (2, 2, 1, 2) +Step 3: pick 2 and 1 => (1, 2, 2) +Step 4: pick 2 and 1 => (1, 2) +Step 5: pick 1 and 2 => (1) +Example 2 +Input: @ints = (3, 2, 5) +Output: 0 + +Step 1: pick 3 and 5 => (2, 2) +Step 2: pick 2 and 2 => () +=end comment + +=begin comment + Although the game cannot generate a zed, it is a possible ending + value. So I am maintaining the difference between empty and 0. +=end comment + + +my @Test = + Int, ()».Int, + 0, (0,)».Int, + 3, (3,)».Int, + Int, (0,0)».Int, + Int, ( -1, -1)».Int, + 0, (0,0,0)».Int, + Int, (3, 2, 5)».Int, + Int, (3,3,3,3)».Int, + 1, (1,1, 39 ,40)».Int, + 3, (3,3,3,3,3)».Int, + 1, (3, 8, 5, 2, 9, 2)».Int, + 7, (0, 0, 0, 0, 0, 7)».Int, +; +plan @Test ÷ 2; + + +only task( @a --> Int) { + my $h = @a.BagHash; + my Int $max; + my Int $max-jr; + + loop { + return Int if not $h; # ().BagHash + + # Handle the max level. + $max = $h.keys.max; + next if $h{$max} :delete %% 2; # Just delete it. + + return $max if not $h; # No next level. + + $max-jr = $h.keys.max; # Calc & store difference. + -- $h{ $max-jr}; + $h.add( $max - $max-jr ); + } +} + +for @Test -> $exp, @in { + is task( @in), $exp, "{$exp // $exp.^name()} <- @in.raku()" +} +done-testing; + +my Int @int = 3, 8, 5, 2, 9, 1; +say "\nInput: @int = @int[]\nOutput: ", task(@int) // 0; + -- cgit From 8e2d10b3db8aa23569e02582c79be2e28fc1ae7f Mon Sep 17 00:00:00 2001 From: rir Date: Thu, 30 Jan 2025 23:03:06 -0500 Subject: 306 --- challenge-306/0rir/raku/ch-1.raku | 4 ++-- challenge-306/0rir/raku/ch-2.raku | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/challenge-306/0rir/raku/ch-1.raku b/challenge-306/0rir/raku/ch-1.raku index f6d1937fa5..e40bf11f01 100644 --- a/challenge-306/0rir/raku/ch-1.raku +++ b/challenge-306/0rir/raku/ch-1.raku @@ -40,8 +40,8 @@ plan @Test ÷ 2; multi task( [] ) { 0 } multi task( @a --> Int) { - sum do for 1, *+2 … @a % 2 ?? +@a !! @a -1 { - @a.rotor($_ => -$_ +1 ).flat.sum; + sum do for 1, *+2 … $ = @a % 2 ?? +@a !! @a -1 { + sum @a.rotor($_ => -$_ +1 ).flat; } } diff --git a/challenge-306/0rir/raku/ch-2.raku b/challenge-306/0rir/raku/ch-2.raku index ade054fab6..360a462676 100644 --- a/challenge-306/0rir/raku/ch-2.raku +++ b/challenge-306/0rir/raku/ch-2.raku @@ -62,22 +62,23 @@ only task( @a --> Int) { my Int $max-jr; loop { - return Int if not $h; # ().BagHash + return Int if not $h; # Done if empty. # Handle the max level. $max = $h.keys.max; - next if $h{$max} :delete %% 2; # Just delete it. + next if $h{$max} :delete %% 2; return $max if not $h; # No next level. - $max-jr = $h.keys.max; # Calc & store difference. + # Grab next max, delete it, and store the differ𝑒nce. + $max-jr = $h.keys.max; -- $h{ $max-jr}; - $h.add( $max - $max-jr ); + $h.add( $max - $max-jr); } } for @Test -> $exp, @in { - is task( @in), $exp, "{$exp // $exp.^name()} <- @in.raku()" + is task( @in), $exp, "{$exp // $exp.^name()}\t<- @in.raku()" } done-testing; -- cgit From 1e984d5512db7388effcb2a1125ed666f4684649 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Tue, 28 Jan 2025 22:53:12 +0100 Subject: Solution to task 1 --- challenge-306/jo-37/perl/ch-1.pl | 102 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 challenge-306/jo-37/perl/ch-1.pl diff --git a/challenge-306/jo-37/perl/ch-1.pl b/challenge-306/jo-37/perl/ch-1.pl new file mode 100755 index 0000000000..727261bfc5 --- /dev/null +++ b/challenge-306/jo-37/perl/ch-1.pl @@ -0,0 +1,102 @@ +#!/usr/bin/perl + +use v5.26; +use Test2::V0 '!float'; +use Test2::Tools::Subtest 'subtest_streamed'; +use Getopt::Long; +use experimental 'signatures'; + +use PDL; +use PDL::NiceSlice; + + +### Options and Arguments + +my ($tests, $examples, $verbose); +GetOptions( + 'examples!' => \$examples, + 'tests!' => \$tests, + 'verbose!' => \$verbose, +) or usage(); + +run_tests($examples, $tests); # tests do not return + +usage() unless @ARGV; + +sub usage { + die <<~EOS; + $0 - odd sum + + usage: $0 [-examples] [-tests] [N...] + + -examples + run the examples from the challenge + + -tests + run some tests and + print weights for L = 1..10 + + N... + list of numbers + + EOS +} + + +### Input and Output + +say odd_sum(@ARGV); + + +### Implementation +# +# For details see: +# https://github.sommrey.de/the-bears-den/2025/01/31/ch-306.html#task-1 + +sub weight ($n) { + my $k = int +($n + 1) / 2; + cat((1 + sequence $n)->(*$k), + ($n - sequence $n)->(*$k), + (1 + 2 * sequence $k)->(,*$n), + ($n - 2 * sequence $k)->(,*$n) + )->mv(2, 0)->minover->sumover; +} + +sub odd_sum { + my $l = long [@_]; + inner($l, weight($l->dim(0)))->sclr; +} + + +### Examples and Tests + +sub run_tests ($examples, $tests) { + return unless $examples || $tests; + + state sub run_example ($args, $expected, $name) { + my $result = odd_sum(@$args); + is $result, $expected, + "$name: (@$args) -> " . $expected; + } + + plan 2; + + $examples ? subtest_streamed(examples => sub { + my @examples = ( + [[2, 5, 3, 6, 4], 77, 'example 1'], + [[1, 3], 4, 'example 2'], + ); + plan scalar @examples; + for (@examples) { + run_example @$_; + } + }) : pass 'skip examples'; + + $tests ? subtest_streamed(tests => sub { + plan 1; + say weight($_) for 1 .. 10; + is odd_sum(20, 15, 12, 15, 20), 300, '60 * 5'; + }) : pass 'skip tests'; + + exit; +} -- cgit From 432c640a92c1d5b23972b41e2d7a22e5b801e6ab Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Tue, 28 Jan 2025 22:53:29 +0100 Subject: Solution to task 2 --- challenge-306/jo-37/perl/ch-2.pl | 97 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 challenge-306/jo-37/perl/ch-2.pl diff --git a/challenge-306/jo-37/perl/ch-2.pl b/challenge-306/jo-37/perl/ch-2.pl new file mode 100755 index 0000000000..b534674492 --- /dev/null +++ b/challenge-306/jo-37/perl/ch-2.pl @@ -0,0 +1,97 @@ +#!/usr/bin/perl + +use v5.26; +use Test2::V0; +use Test2::Tools::Subtest 'subtest_streamed'; +use Getopt::Long; +use experimental 'signatures'; + +use List::MoreUtils qw(nsort_by binsert); + + +### Options and Arguments + +my ($tests, $examples, $verbose); +GetOptions( + 'examples!' => \$examples, + 'tests!' => \$tests, + 'verbose!' => \$verbose, +) or usage(); + +run_tests($examples, $tests); # tests do not return + +usage() unless @ARGV; + +sub usage { + die <<~EOS; + $0 - last element + + usage: $0 [-examples] [-tests] [-verbose] [N...] + + -examples + run the examples from the challenge + + -tests + run some tests + + N... + list of numbers + + EOS +} + + +### Input and Output + +say last_element(@ARGV); + + +### Implementation +# +# For details see: +# https://github.sommrey.de/the-bears-den/2025/01/31/ch-306.html#task-2 + + +sub last_element { + my @list = nsort_by {$_} @_; + while (@list > 1) { + my ($m1, $m2) = splice @list, -2; + my $diff = $m2 - $m1; + next unless $diff; + binsert {$_ <=> $diff} $diff, @list; + } + $list[0] // 0; +} + + +### Examples and Tests + +sub run_tests ($examples, $tests) { + return unless $examples || $tests; + + state sub run_example ($args, $expected, $name) { + my $result = last_element(@$args); + is $result, $expected, + "$name: (@$args) -> " . $expected; + } + + plan 2; + + $examples ? subtest_streamed(examples => sub { + my @examples = ( + [[3, 8, 5, 2, 9, 2], 1, 'example 1'], + [[3, 2, 5], 0, 'example 2'], + ); + plan scalar @examples; + for (@examples) { + run_example @$_; + } + }) : pass 'skip examples'; + + $tests ? subtest_streamed(tests => sub { + plan 8; + is last_element(map 2**$_ - 1, 1 .. $_), $_, 2**$_ - 1 for 1 .. 8; + }) : pass 'skip tests'; + + exit; +} -- cgit From 506d6356fed9796931d46821fa4eb70d96cf6517 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Tue, 28 Jan 2025 22:53:45 +0100 Subject: Blog for challenge 306 --- challenge-306/jo-37/blog.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 challenge-306/jo-37/blog.txt diff --git a/challenge-306/jo-37/blog.txt b/challenge-306/jo-37/blog.txt new file mode 100644 index 0000000000..71fec76ed5 --- /dev/null +++ b/challenge-306/jo-37/blog.txt @@ -0,0 +1 @@ +https://github.sommrey.de/the-bears-den/2025/01/31/ch-306.html -- cgit From 8882e65af6c104914a9b314c79779df4a65e77de Mon Sep 17 00:00:00 2001 From: Thomas Köhler Date: Fri, 31 Jan 2025 20:41:17 +0100 Subject: Add solution 306 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Köhler --- challenge-306/jeanluc2020/blog-1.txt | 1 + challenge-306/jeanluc2020/blog-2.txt | 1 + challenge-306/jeanluc2020/perl/ch-1.pl | 65 ++++++++++++++++++ challenge-306/jeanluc2020/perl/ch-2.pl | 116 +++++++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 challenge-306/jeanluc2020/blog-1.txt create mode 100644 challenge-306/jeanluc2020/blog-2.txt create mode 100755 challenge-306/jeanluc2020/perl/ch-1.pl create mode 100755 challenge-306/jeanluc2020/perl/ch-2.pl diff --git a/challenge-306/jeanluc2020/blog-1.txt b/challenge-306/jeanluc2020/blog-1.txt new file mode 100644 index 0000000000..07a76c8dcd --- /dev/null +++ b/challenge-306/jeanluc2020/blog-1.txt @@ -0,0 +1 @@ +http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/perl/theweeklychallenge-306-1.html diff --git a/challenge-306/jeanluc2020/blog-2.txt b/challenge-306/jeanluc2020/blog-2.txt new file mode 100644 index 0000000000..5e234e59e6 --- /dev/null +++ b/challenge-306/jeanluc2020/blog-2.txt @@ -0,0 +1 @@ +http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/perl/theweeklychallenge-306-2.html diff --git a/challenge-306/jeanluc2020/perl/ch-1.pl b/challenge-306/jeanluc2020/perl/ch-1.pl new file mode 100755 index 0000000000..0676779cbf --- /dev/null +++ b/challenge-306/jeanluc2020/perl/ch-1.pl @@ -0,0 +1,65 @@ +#!/usr/bin/env perl +# https://theweeklychallenge.org/blog/perl-weekly-challenge-306/#TASK1 +# +# Task 1: Odd Sum +# =============== +# +# You are given an array of positive integers, @ints. +# +# Write a script to return the sum of all possible odd-length subarrays of the +# given array. A subarray is a contiguous subsequence of the array. +# +## Example 1 +## +## Input: @ints = (2, 5, 3, 6, 4) +## Output: 77 +## +## Odd length sub-arrays: +## (2) => 2 +## (5) => 5 +## (3) => 3 +## (6) => 6 +## (4) => 4 +## (2, 5, 3) => 10 +## (5, 3, 6) => 14 +## (3, 6, 4) => 13 +## (2, 5, 3, 6, 4) => 20 +## +## Sum => 2 + 5 + 3 + 6 + 4 + 10 + 14 + 13 + 20 => 77 +# +## Example 2 +## +## Input: @ints = (1, 3) +## Output: 4 +# +############################################################ +## +## discussion +## +############################################################ +# +# We walk the array from the first element to the last and +# add the sum of all subarrays starting at the current element +# when the number of elements in that subarray is odd. + +use strict; +use warnings; +use List::Util qw(sum); + +odd_sum(2, 5, 3, 6, 4); +odd_sum(1, 3); + +sub odd_sum { + my @ints = @_; + print "Input: (" . join(",", @ints) . ")\n"; + my $sum = 0; + foreach my $i (0..$#ints) { + foreach my $j ($i..$#ints) { + my @tmp = @ints[$i..$j]; + if(scalar(@tmp) % 2) { + $sum += sum(@tmp); + } + } + } + print "Output: $sum\n"; +} diff --git a/challenge-306/jeanluc2020/perl/ch-2.pl b/challenge-306/jeanluc2020/perl/ch-2.pl new file mode 100755 index 0000000000..49b768f2ed --- /dev/null +++ b/challenge-306/jeanluc2020/perl/ch-2.pl @@ -0,0 +1,116 @@ +#!/usr/bin/env perl +# https://theweeklychallenge.org/blog/perl-weekly-challenge-306/#TASK2 +# +# Task 2: Last Element +# ==================== +# +# You are given a array of integers, @ints. +# +# Write a script to play a game where you pick two biggest integers in the +# given array, say x and y. Then do the following: +# +# a) if x == y then remove both from the given array +# b) if x != y then remove x and replace y with (y - x) +# +# At the end of the game, there is at most one element left. +# +# Return the last element if found otherwise return 0. +# +## Example 1 +## +## Input: @ints = (3, 8, 5, 2, 9, 2) +## Output: 1 +## +## Step 1: pick 8 and 9 => (3, 5, 2, 1, 2) +## Step 2: pick 3 and 5 => (2, 2, 1, 2) +## Step 3: pick 2 and 1 => (1, 2, 2) +## Step 4: pick 2 and 1 => (1, 2) +## Step 5: pick 1 and 2 => (1) +# +## Example 2 +## +## Input: @ints = (3, 2, 5) +## Output: 0 +## +## Step 1: pick 3 and 5 => (2, 2) +## Step 2: pick 2 and 2 => () +# +############################################################ +## +## discussion +## +############################################################ +# +# There is a bit of ambiguity in the description that is clarified +# by the examples: if there are multiple elements of different value, +# but also multiple elements that are as big as the maximum element, +# then pick one of the biggest values and one of the second biggest, +# NOT two of the biggest. So from (2, 2, 1, 2) pick 2 and 1, not +# 2 and 2. +# With that clarified, we can now implement the whole thing: Search +# the two biggest values in the array, then handle them as layed out +# in the rules. +# + +use v5.36; + +last_element(3, 8, 5, 2, 9, 2); +last_element(3, 2, 5); + +sub last_element(@ints) { + say "Input: (" . join(",", @ints) . ")"; + while(@ints) { + if(1 == scalar(@ints)) { + say "Output: " . $ints[0]; + return; + } + my ($max1, $max2) = @ints[0..1]; + if($max1 < $max2) { + ($max1, $max2) = ($max2, $max1); + } + foreach my $i (2..$#ints) { + if($ints[$i] > $max1) { + ($max1, $max2) = ($ints[$i], $max1); + } elsif ($max1 == $max2) { + $max2 = $ints[$i]; + } else { + if($ints[$i] > $max2 && $ints[$i] < $max1) { + $max2 = $ints[$i]; + } + } + } + if($max1 == $max2) { + # remove two occurences of $max1 + my @tmp = (); + my $removed = 0; + foreach my $elem (@ints) { + if($elem == $max1 && $removed < 2) { + $removed++; + next; + } + push @tmp, $elem; + } + @ints = @tmp; + } else { + # remove max2, replace max1 with max1-max2 + my @tmp = (); + my $new = $max1 - $max2; + my $removed = 0; + my $replaced = 0; + foreach my $elem (@ints) { + if($elem == $max1 && ! $removed) { + $removed = 1; + next; + } + if($elem == $max2 && ! $replaced) { + push @tmp, $new; + $replaced = 1; + next; + } + push @tmp, $elem; + } + @ints = @tmp; + } + } + say "Output: 0"; +} -- cgit From 5af61d45f5ddbcea01ee0250f411de8396ee09e3 Mon Sep 17 00:00:00 2001 From: Arne Sommer Date: Fri, 31 Jan 2025 23:35:11 +0100 Subject: Arne Sommer --- challenge-306/arne-sommer/blog.txt | 1 + challenge-306/arne-sommer/raku/ch-1.raku | 22 +++++++++++++++++ challenge-306/arne-sommer/raku/ch-2.raku | 31 ++++++++++++++++++++++++ challenge-306/arne-sommer/raku/last-element | 31 ++++++++++++++++++++++++ challenge-306/arne-sommer/raku/last-element-sort | 28 +++++++++++++++++++++ challenge-306/arne-sommer/raku/odd-sum | 22 +++++++++++++++++ 6 files changed, 135 insertions(+) create mode 100644 challenge-306/arne-sommer/blog.txt create mode 100755 challenge-306/arne-sommer/raku/ch-1.raku create mode 100755 challenge-306/arne-sommer/raku/ch-2.raku create mode 100755 challenge-306/arne-sommer/raku/last-element create mode 100755 challenge-306/arne-sommer/raku/last-element-sort create mode 100755 challenge-306/arne-sommer/raku/odd-sum diff --git a/challenge-306/arne-sommer/blog.txt b/challenge-306/arne-sommer/blog.txt new file mode 100644 index 0000000000..571da8edc5 --- /dev/null +++ b/challenge-306/arne-sommer/blog.txt @@ -0,0 +1 @@ +https://raku-musings.com/elementary-odd.html diff --git a/challenge-306/arne-sommer/raku/ch-1.raku b/challenge-306/arne-sommer/raku/ch-1.raku new file mode 100755 index 0000000000..8b6a3633a5 --- /dev/null +++ b/challenge-306/arne-sommer/raku/ch-1.raku @@ -0,0 +1,22 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@ints where all(@ints) ~~ Int && all(@ints) > 0, + :v(:$verbose)); + +my $end = @ints.end; +my $sum = 0; + +for 0 .. $end -> $start +{ + for $start .. $end -> $stop + { + next unless ($stop - $start) %% 2; + my @slice = @ints[$start .. $stop]; + my $total = @slice.sum; + $sum += $total; + + say ": Slice Indices:$start:$stop Values:({ @slice.join(",") }) Sum:$total Total:$sum" if $verbose; + } +} + +say $sum; diff --git a/challenge-306/arne-sommer/raku/ch-2.raku b/challenge-306/arne-sommer/raku/ch-2.raku new file mode 100755 index 0000000000..8709e83d53 --- /dev/null +++ b/challenge-306/arne-sommer/raku/ch-2.raku @@ -0,0 +1,31 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@ints where all(@ints) ~~ Int, + :v(:$verbose)); + +while @ints.elems >= 2 +{ + my @x-index = @ints.max(:k); + my $x = @ints[@x-index[0]]; + + sink @ints.splice(@x-index[0], 1); + + if @x-index.elems > 1 + { + my @y-index = @ints.max(:k); + sink @ints.splice(@y-index[0], 1); + say ": Removed x:$x and y:$x -> ({ @ints.join(",") })" if $verbose; + } + else + { + my @y-index = @ints.max(:k); + my $y = @ints[@y-index[0]]; + my $replace = $x - $y; + + sink @ints.splice(@y-index[0], 1, $replace); + + say ": Removed x:$x, replaced y:$y with $replace -> ({ @ints.join(",") })" if $verbose; + } +} + +say @ints.elems ?? @ints.head !! 0; diff --git a/challenge-306/arne-sommer/raku/last-element b/challenge-306/arne-sommer/raku/last-element new file mode 100755 index 0000000000..8709e83d53 --- /dev/null +++ b/challenge-306/arne-sommer/raku/last-element @@ -0,0 +1,31 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@ints where all(@ints) ~~ Int, + :v(:$verbose)); + +while @ints.elems >= 2 +{ + my @x-index = @ints.max(:k); + my $x = @ints[@x-index[0]]; + + sink @ints.splice(@x-index[0], 1); + + if @x-index.elems > 1 + { + my @y-index = @ints.max(:k); + sink @ints.splice(@y-index[0], 1); + say ": Removed x:$x and y:$x -> ({ @ints.join(",") })" if $verbose; + } + else + { + my @y-index = @ints.max(:k); + my $y = @ints[@y-index[0]]; + my $replace = $x - $y; + + sink @ints.splice(@y-index[0], 1, $replace); + + say ": Removed x:$x, replaced y:$y with $replace -> ({ @ints.join(",") })" if $verbose; + } +} + +say @ints.elems ?? @ints.head !! 0; diff --git a/challenge-306/arne-sommer/raku/last-element-sort b/challenge-306/arne-sommer/raku/last-element-sort new file mode 100755 index 0000000000..91ba72492d --- /dev/null +++ b/challenge-306/arne-sommer/raku/last-element-sort @@ -0,0 +1,28 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@ints where all(@ints) ~~ Int, + :v(:$verbose)); + +my @sorted = @ints.sort(-*); + +say ":Sorted: { @sorted.join(",") }" if $verbose; + +while @sorted.elems >= 2 +{ + my $y = @sorted.shift; + my $x = @sorted.shift; + + if $x == $y + { + say ":Removed x:$x and y:$y -> ({ @sorted.join(",") })" if $verbose; + } + else + { + my $replace = $y - $x; + @sorted.push: $replace; + @sorted .= sort(-*); + say ":Replaced x:$x and y:$y with $replace -> ({ @sorted.join(",") })" if $verbose; + } +} + +say @sorted.elems ?? @sorted.head !! 0; diff --git a/challenge-306/arne-sommer/raku/odd-sum b/challenge-306/arne-sommer/raku/odd-sum new file mode 100755 index 0000000000..8b6a3633a5 --- /dev/null +++ b/challenge-306/arne-sommer/raku/odd-sum @@ -0,0 +1,22 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@ints where all(@ints) ~~ Int && all(@ints) > 0, + :v(:$verbose)); + +my $end = @ints.end; +my $sum = 0; + +for 0 .. $end -> $start +{ + for $start .. $end -> $stop + { + next unless ($stop - $start) %% 2; + my @slice = @ints[$start .. $stop]; + my $total = @slice.sum; + $sum += $total; + + say ": Slice Indices:$start:$stop Values:({ @slice.join(",") }) Sum:$total Total:$sum" if $verbose; + } +} + +say $sum; -- cgit From bd20e3321fa66adb7e5734015c3cb71c22a38fc8 Mon Sep 17 00:00:00 2001 From: Mohammad Sajid Anwar Date: Fri, 31 Jan 2025 23:15:38 +0000 Subject: - Added solutions by Robert Ransbottom. - Added solutions by Jorg Sommrey. - Added solutions by Arne Sommer. - Added solutions by Thomas Kohler. --- stats/pwc-current.json | 290 ++++++----- stats/pwc-language-breakdown-2019.json | 610 +++++++++++------------ stats/pwc-language-breakdown-2020.json | 776 +++++++++++++++--------------- stats/pwc-language-breakdown-2021.json | 432 ++++++++--------- stats/pwc-language-breakdown-2022.json | 396 +++++++-------- stats/pwc-language-breakdown-2023.json | 774 ++++++++++++++--------------- stats/pwc-language-breakdown-2024.json | 410 ++++++++-------- stats/pwc-language-breakdown-2025.json | 128 ++--- stats/pwc-language-breakdown-summary.json | 90 ++-- stats/pwc-leaders.json | 402 ++++++++-------- stats/pwc-summary-1-30.json | 50 +- stats/pwc-summary-121-150.json | 40 +- stats/pwc-summary-151-180.json | 104 ++-- stats/pwc-summary-181-210.json | 32 +- stats/pwc-summary-211-240.json | 106 ++-- stats/pwc-summary-241-270.json | 106 ++-- stats/pwc-summary-271-300.json | 50 +- stats/pwc-summary-301-330.json | 46 +- stats/pwc-summary-31-60.json | 34 +- stats/pwc-summary-61-90.json | 114 ++--- stats/pwc-summary-91-120.json | 48 +- stats/pwc-summary.json | 52 +- stats/pwc-yearly-language-summary.json | 108 ++--- 23 files changed, 2635 insertions(+), 2563 deletions(-) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index a0004f83bd..f99854aba9 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,114 +1,63 @@ { - "title" : { - "text" : "The Weekly Challenge - 306" - }, - "series" : [ - { - "name" : "The Weekly Challenge - 306", - "colorByPoint" : 1, - "data" : [ - { - "name" : "Andreas Mahnke", - "y" : 2, - "drilldown" : "Andreas Mahnke" - }, - { - "name" : "David Ferrone", - "y" : 2, - "drilldown" : "David Ferrone" - }, - { - "y" : 2, - "name" : "E. Choroba", - "drilldown" : "E. Choroba" - }, - { - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch", - "y" : 2 - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 - }, - { - "drilldown" : "Niels van Dijke", - "y" : 2, - "name" : "Niels van Dijke" - }, - { - "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" - }, - { - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros", - "y" : 2 - }, - { - "y" : 3, - "name" : "Robbie Hatley", - "drilldown" : "Robbie Hatley" - }, - { - "drilldown" : "Roger Bell_West", - "y" : 4, - "name" : "Roger Bell_West" - }, - { - "y" : 4, - "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke" - }, - { - "y" : 3, - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan" - } - ] - } - ], - "tooltip" : { - "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1 - }, - "chart" : { - "type" : "column" - }, "drilldown" : { "series" : [ { + "name" : "Andreas Mahnke", + "id" : "Andreas Mahnke", "data" : [ [ "Perl", 2 ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] ], - "name" : "Andreas Mahnke", - "id" : "Andreas Mahnke" + "id" : "Arne Sommer", + "name" : "Arne Sommer" }, { - "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], "name" : "David Ferrone", + "id" : "David Ferrone" + }, + { "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" }, { "data" : [ [ "Perl", 2 + ], + [ + "Blog", + 1 ] ], - "id" : "E. Choroba", - "name" : "E. Choroba" + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" }, { "data" : [ @@ -117,32 +66,30 @@ 2 ] ], - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch" }, { - "id" : "Mark Anderson", - "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson", + "name" : "Mark Anderson" }, { + "name" : "Niels van Dijke", + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke", - "name" : "Niels van Dijke" + ] }, { - "name" : "Peter Campbell Smith", - "id" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -152,21 +99,21 @@ "Blog", 1 ] - ] + ], + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" }, { - "id" : "Peter Meszaros", - "name" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Peter Meszaros", + "name" : "Peter Meszaros" }, { - "id" : "Robbie Hatley", - "name" : "Robbie Hatley", "data" : [ [ "Perl", @@ -176,9 +123,23 @@ "Blog", 1 ] + ], + "name" : "Robbie Hatley", + "id" : "Robbie Hatley" + }, + { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "data" : [ + [ + "Raku", + 2 + ] ] }, { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -188,13 +149,23 @@ "Raku", 2 ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] ], - "name" : "Roger Bell_West", - "id" : "Roger Bell_West" + "id" : "Thomas Kohler", + "name" : "Thomas Kohler" }, { - "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -204,11 +175,13 @@ "Raku", 2 ] - ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -222,17 +195,28 @@ } ] }, + "subtitle" : { + "text" : "[Champions: 16] Last updated at 2025-01-31 23:15:12 GMT" + }, "yAxis" : { "title" : { "text" : "Total Solutions" } }, - "subtitle" : { - "text" : "[Champions: 12] Last updated at 2025-01-29 21:01:18 GMT" + "title" : { + "text" : "The Weekly Challenge - 306" }, "legend" : { "enabled" : 0 }, + "chart" : { + "type" : "column" + }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
" + }, "plotOptions" : { "series" : { "borderWidth" : 0, @@ -242,6 +226,94 @@ } } }, + "series" : [ + { + "name" : "The Weekly Challenge - 306", + "data" : [ + { + "drilldown" : "Andreas Mahnke", + "y" : 2, + "name" : "Andreas Mahnke" + }, + { + "name" : "Arne Sommer", + "y" : 3, + "drilldown" : "Arne Sommer" + }, + { + "name" : "David Ferrone", + "y" : 2, + "drilldown" : "David Ferrone" + }, + { + "drilldown" : "E. Choroba", + "y" : 2, + "name" : "E. Choroba" + }, + { + "drilldown" : "Jorg Sommrey", + "y" : 3, + "name" : "Jorg Sommrey" + }, + { + "y" : 2, + "drilldown" : "Lubos Kolouch", + "name" : "Lubos Kolouch" + }, + { + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson", + "y" : 2 + }, + { + "drilldown" : "Niels van Dijke", + "y" : 2, + "name" : "Niels van Dijke" + }, + { + "y" : 3, + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" + }, + { + "y" : 2, + "drilldown" : "Peter Meszaros", + "name" : "Peter Meszaros" + }, + { + "y" : 3, + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley" + }, + { + "y" : 2, + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom" + }, + { + "name" : "Roger Bell_West", + "y" : 4, + "drilldown" : "Roger Bell_West" + }, + { + "y" : 4, + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "y" : 4, + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + } + ], + "colorByPoint" : 1 + } + ], "xAxis" : { "type" : "category" } diff --git a/stats/pwc-language-breakdown-2019.json b/stats/pwc-language-breakdown-2019.json index e27303fd2a..6901eb7285 100644 --- a/stats/pwc-language-breakdown-2019.json +++ b/stats/pwc-language-breakdown-2019.json @@ -1,16 +1,226 @@ { - "legend" : { - "enabled" : "false" - }, "plotOptions" : { "series" : { "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 + "enabled" : 1, + "format" : "{point.y}" }, "borderWidth" : 0 } }, + "series" : [ + { + "name" : "The Weekly Challenge Languages", + "colorByPoint" : "true", + "data" : [ + { + "name" : "041", + "drilldown" : "041", + "y" : 80 + }, + { + "name" : "040", + "drilldown" : "040", + "y" : 77 + }, + { + "drilldown" : "039", + "y" : 68, + "name" : "039" + }, + { + "y" : 74, + "drilldown" : "038", + "name" : "038" + }, + { + "drilldown" : "037", + "y" : 70, + "name" : "037" + }, + { + "drilldown" : "036", + "y" : 70, + "name" : "036" + }, + { + "name" : "035", + "drilldown" : "035", + "y" : 68 + }, + { + "y" : 70, + "drilldown" : "034", + "name" : "034" + }, + { + "name" : "033", + "y" : 113, + "drilldown" : "033" + }, + { + "drilldown" : "032", + "y" : 97, + "name" : "032" + }, + { + "drilldown" : "031", + "y" : 93, + "name" : "031" + }, + { + "name" : "030", + "y" : 120, + "drilldown" : "030" + }, + { + "y" : 83, + "drilldown" : "029", + "name" : "029" + }, + { + "name" : "028", + "drilldown" : "028", + "y" : 82 + }, + { + "drilldown" : "027", + "y" : 64, + "name" : "027" + }, + { + "name" : "026", + "y" : 75, + "drilldown" : "026" + }, + { + "name" : "025", + "y" : 62, + "drilldown" : "025" + }, + { + "drilldown" : "024", + "y" : 77, + "name" : "024" + }, + { + "y" : 88, + "drilldown" : "023", + "name" : "023" + }, + { + "drilldown" : "022", + "y" : 72, + "name" : "022" + }, + { + "y" : 72, + "drilldown" : "021", + "name" : "021" + }, + { + "y" : 100, + "drilldown" : "020", + "name" : "020" + }, + { + "drilldown" : "019", + "y" : 101, + "name" : "019" + }, + { + "y" : 82, + "drilldown" : "018", + "name" : "018" + }, + { + "name" : "017", + "y" : 83, + "drilldown" : "017" + }, + { + "drilldown" : "016", + "y" : 75, + "name" : "016" + }, + { + "drilldown" : "015", + "y" : 95, + "name" : "015" + }, + { + "drilldown" : "014", + "y" : 98, + "name" : "014" + }, + { + "y" : 85, + "drilldown" : "013", + "name" : "013" + }, + { + "drilldown" : "012", + "y" : 90, + "name" : "012" + }, + { + "drilldown" : "011", + "y" : 86, + "name" : "011" + }, + { + "name" : "010", + "drilldown" : "010", + "y" : 69 + }, + { + "name" : "009", + "drilldown" : "009", + "y" : 79 + }, + { + "y" : 82, + "drilldown" : "008", + "name" : "008" + }, + { + "drilldown" : "007", + "y" : 71, + "name" : "007" + }, + { + "name" : "006", + "y" : 63, + "drilldown" : "006" + }, + { + "name" : "005", + "y" : 82, + "drilldown" : "005" + }, + { + "y" : 106, + "drilldown" : "004", + "name" : "004" + }, + { + "y" : 91, + "drilldown" : "003", + "name" : "003" + }, + { + "y" : 133, + "drilldown" : "002", + "name" : "002" + }, + { + "drilldown" : "001", + "y" : 165, + "name" : "001" + } + ] + } + ], "xAxis" : { "type" : "category" }, @@ -20,16 +230,13 @@ } }, "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-01-29 21:01:18 GMT" - }, - "chart" : { - "type" : "column" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-01-31 23:15:12 GMT" }, "drilldown" : { "series" : [ { - "id" : "041", "name" : "041", + "id" : "041", "data" : [ [ "Perl", @@ -60,12 +267,12 @@ 10 ] ], - "id" : "040", - "name" : "040" + "name" : "040", + "id" : "040" }, { - "name" : "039", "id" : "039", + "name" : "039", "data" : [ [ "Perl", @@ -82,8 +289,6 @@ ] }, { - "id" : "038", - "name" : "038", "data" : [ [ "Perl", @@ -97,11 +302,11 @@ "Blog", 12 ] - ] + ], + "id" : "038", + "name" : "038" }, { - "id" : "037", - "name" : "037", "data" : [ [ "Perl", @@ -115,9 +320,13 @@ "Blog", 9 ] - ] + ], + "name" : "037", + "id" : "037" }, { + "id" : "036", + "name" : "036", "data" : [ [ "Perl", @@ -131,9 +340,7 @@ "Blog", 11 ] - ], - "name" : "036", - "id" : "036" + ] }, { "data" : [ @@ -154,6 +361,8 @@ "name" : "035" }, { + "name" : "034", + "id" : "034", "data" : [ [ "Perl", @@ -167,13 +376,11 @@ "Blog", 11 ] - ], - "name" : "034", - "id" : "034" + ] }, { - "name" : "033", "id" : "033", + "name" : "033", "data" : [ [ "Perl", @@ -222,8 +429,8 @@ 9 ] ], - "name" : "031", - "id" : "031" + "id" : "031", + "name" : "031" }, { "data" : [ @@ -244,8 +451,8 @@ "id" : "030" }, { - "id" : "029", "name" : "029", + "id" : "029", "data" : [ [ "Perl", @@ -276,12 +483,10 @@ 9 ] ], - "id" : "028", - "name" : "028" + "name" : "028", + "id" : "028" }, { - "id" : "027", - "name" : "027", "data" : [ [ "Perl", @@ -295,7 +500,9 @@ "Blog", 9 ] - ] + ], + "name" : "027", + "id" : "027" }, { "name" : "026", @@ -316,8 +523,6 @@ ] }, { - "name" : "025", - "id" : "025", "data" : [ [ "Perl", @@ -331,9 +536,13 @@ "Blog", 12 ] - ] + ], + "name" : "025", + "id" : "025" }, { + "id" : "024", + "name" : "024", "data" : [ [ "Perl", @@ -347,9 +556,7 @@ "Blog", 11 ] - ], - "name" : "024", - "id" : "024" + ] }, { "name" : "023", @@ -388,6 +595,8 @@ "id" : "022" }, { + "id" : "021", + "name" : "021", "data" : [ [ "Perl", @@ -401,11 +610,11 @@ "Blog", 10 ] - ], - "name" : "021", - "id" : "021" + ] }, { + "id" : "020", + "name" : "020", "data" : [ [ "Perl", @@ -419,13 +628,9 @@ "Blog", 13 ] - ], - "name" : "020", - "id" : "020" + ] }, { - "name" : "019", - "id" : "019", "data" : [ [ "Perl", @@ -439,11 +644,11 @@ "Blog", 13 ] - ] + ], + "id" : "019", + "name" : "019" }, { - "id" : "018", - "name" : "018", "data" : [ [ "Perl", @@ -457,11 +662,11 @@ "Blog", 14 ] - ] + ], + "name" : "018", + "id" : "018" }, { - "id" : "017", - "name" : "017", "data" : [ [ "Perl", @@ -475,11 +680,11 @@ "Blog", 12 ] - ] + ], + "id" : "017", + "name" : "017" }, { - "name" : "016", - "id" : "016", "data" : [ [ "Perl", @@ -493,7 +698,9 @@ "Blog", 13 ] - ] + ], + "id" : "016", + "name" : "016" }, { "data" : [ @@ -510,10 +717,12 @@ 15 ] ], - "name" : "015", - "id" : "015" + "id" : "015", + "name" : "015" }, { + "name" : "014", + "id" : "014", "data" : [ [ "Perl", @@ -527,13 +736,9 @@ "Blog", 15 ] - ], - "id" : "014", - "name" : "014" + ] }, { - "id" : "013", - "name" : "013", "data" : [ [ "Perl", @@ -547,7 +752,9 @@ "Blog", 13 ] - ] + ], + "name" : "013", + "id" : "013" }, { "id" : "012", @@ -568,6 +775,8 @@ ] }, { + "id" : "011", + "name" : "011", "data" : [ [ "Perl", @@ -581,13 +790,11 @@ "Blog", 10 ] - ], - "id" : "011", - "name" : "011" + ] }, { - "id" : "010", "name" : "010", + "id" : "010", "data" : [ [ "Perl", @@ -604,8 +811,6 @@ ] }, { - "id" : "009", - "name" : "009", "data" : [ [ "Perl", @@ -619,7 +824,9 @@ "Blog", 13 ] - ] + ], + "id" : "009", + "name" : "009" }, { "data" : [ @@ -654,10 +861,12 @@ 10 ] ], - "id" : "007", - "name" : "007" + "name" : "007", + "id" : "007" }, { + "name" : "006", + "id" : "006", "data" : [ [ "Perl", @@ -671,13 +880,11 @@ "Blog", 7 ] - ], - "name" : "006", - "id" : "006" + ] }, { - "id" : "005", "name" : "005", + "id" : "005", "data" : [ [ "Perl", @@ -694,8 +901,6 @@ ] }, { - "id" : "004", - "name" : "004", "data" : [ [ "Perl", @@ -709,11 +914,13 @@ "Blog", 10 ] - ] + ], + "name" : "004", + "id" : "004" }, { - "id" : "003", "name" : "003", + "id" : "003", "data" : [ [ "Perl", @@ -744,12 +951,10 @@ 10 ] ], - "id" : "002", - "name" : "002" + "name" : "002", + "id" : "002" }, { - "id" : "001", - "name" : "001", "data" : [ [ "Perl", @@ -763,229 +968,24 @@ "Blog", 12 ] - ] + ], + "id" : "001", + "name" : "001" } ] }, - "title" : { - "text" : "The Weekly Challenge Language" + "chart" : { + "type" : "column" }, - "series" : [ - { - "name" : "The Weekly Challenge Languages", - "data" : [ - { - "name" : "041", - "y" : 80, - "drilldown" : "041" - }, - { - "drilldown" : "040", - "y" : 77, - "name" : "040" - }, - { - "name" : "039", - "y" : 68, - "drilldown" : "039" - }, - { - "y" : 74, - "name" : "038", - "drilldown" : "038" - }, - { - "name" : "037", - "y" : 70, - "drilldown" : "037" - }, - { - "name" : "036", - "y" : 70, - "drilldown" : "036" - }, - { - "drilldown" : "035", - "y" : 68, - "name" : "035" - }, - { - "y" : 70, - "name" : "034", - "drilldown" : "034" - }, - { - "y" : 113, - "name" : "033", - "drilldown" : "033" - }, - { - "drilldown" : "032", - "name" : "032", - "y" : 97 - }, - { - "y" : 93, - "name" : "031", - "drilldown" : "031" - }, - { - "y" : 120, - "name" : "030", - "drilldown" : "030" - }, - { - "y" : 83, - "name" : "029", - "drilldown" : "029" - }, - { - "y" : 82, - "name" : "028", - "drilldown" : "028" - }, - { - "y" : 64, - "name" : "027", - "drilldown" : "027" - }, - { - "drilldown" : "026", - "y" : 75, - "name" : "026" - }, - { - "y" : 62, - "name" : "025", - "drilldown" : "025" - }, - { - "name" : "024", - "y" : 77, - "drilldown" : "024" - }, - { - "y" : 88, - "name" : "023", - "drilldown" : "023" - }, - { - "y" : 72, - "name" : "022", - "drilldown" : "022" - }, - { - "y" : 72, - "name" : "021", - "drilldown" : "021" - }, - { - "name" : "020", - "y" : 100, - "drilldown" : "020" - }, - { - "y" : 101, - "name" : "019", - "drilldown" : "019" - }, - { - "drilldown" : "018", - "y" : 82, - "name" : "018" - }, - { - "drilldown" : "017", - "name" : "017", - "y" : 83 - }, - { - "name" : "016", - "y" : 75, - "drilldown" : "016" - }, - { - "drilldown" : "015", - "name" : "015", - "y" : 95 - }, - { - "y" : 98, - "name" : "014", - "drilldown" : "014" - }, - { - "drilldown" : "013", - "name" : "013", - "y" : 85 - }, - { - "drilldown" : "012", - "y" : 90, - "name" : "012" - }, - { - "name" : "011", - "y" : 86, - "drilldown" : "011" - }, - { - "drilldown" : "010", - "y" : 69, - "name" : "010" - }, - { - "drilldown" : "009", - "name" : "009", - "y" : 79 - }, - { - "name" : "008", - "y" : 82, - "drilldown" : "008" - }, - { - "drilldown" : "007", - "y" : 71, - "name" : "007" - }, - { - "drilldown" : "006", - "name" : "006", - "y" : 63 - }, - { - "drilldown" : "005", - "name" : "005", - "y" : 82 - }, - { - "drilldown" : "004", - "y" : 106, - "name" : "004" - }, - { - "drilldown" : "003", - "y" : 91, - "name" : "003" - }, - { - "name" : "002", - "y" : 133, - "drilldown" : "002" - }, - { - "drilldown" : "001", - "y" : 165, - "name" : "001" - } - ], - "colorByPoint" : "true" - } - ], "tooltip" : { "followPointer" : "true", - "pointFormat" : "Challenge {point.name}: {point.y:f}
", - "headerFormat" : "" + "headerFormat" : "", + "pointFormat" : "Challenge {point.name}: {point.y:f}
" + }, + "legend" : { + "enabled" : "false" + }, + "title" : { + "text" : "The Weekly Challenge Language" } } diff --git a/stats/pwc-language-breakdown-2020.json b/stats/pwc-language-breakdown-2020.json index 7e7b097a05..2176d20050 100644 --- a/stats/pwc-language-breakdown-2020.json +++ b/stats/pwc-language-breakdown-2020.json @@ -1,303 +1,4 @@ { - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-01-29 21:01:18 GMT" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "xAxis" : { - "type" : "category" - }, - "legend" : { - "enabled" : "false" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } - } - }, - "tooltip" : { - "followPointer" : "true", - "headerFormat" : "", - "pointFormat" : "Challenge {point.name}: {point.y:f}
" - }, - "title" : { - "text" : "The Weekly Challenge Language" - }, - "series" : [ - { - "data" : [ - { - "drilldown" : "093", - "y" : 87, - "name" : "093" - }, - { - "drilldown" : "092", - "y" : 98, - "name" : "092" - }, - { - "drilldown" : "091", - "y" : 108, - "name" : "091" - }, - { - "drilldown" : "090", - "y" : 113, - "name" : "090" - }, - { - "drilldown" : "089", - "name" : "089", - "y" : 113 - }, - { - "drilldown" : "088", - "y" : 121, - "name" : "088" - }, - { - "name" : "087", - "y" : 101, - "drilldown" : "087" - }, - { - "y" : 104, - "name" : "086", - "drilldown" : "086" - }, - { - "name" : "085", - "y" : 113, - "drilldown" : "085" - }, - { - "drilldown" : "084", - "y" : 119, - "name" : "084" - }, - { - "y" : 127, - "name" : "083", - "drilldown" : "083" - }, - { - "y" : 114, - "name" : "082", - "drilldown" : "082" - }, - { - "y" : 114, - "name" : "081", - "drilldown" : "081" - }, - { - "drilldown" : "080", - "y" : 127, - "name" : "080" - }, - { - "y" : 122, - "name" : "079", - "drilldown" : "079" - }, - { - "name" : "078", - "y" : 127, - "drilldown" : "078" - }, - { - "drilldown" : "077", - "y" : 100, - "name" : "077" - }, - { - "y" : 101, - "name" : "076", - "drilldown" : "076" - }, - { - "name" : "075", - "y" : 117, - "drilldown" : "075" - }, - { - "y" : 117, - "name" : "074", - "drilldown" : "074" - }, - { - "y" : 112, - "name" : "073", - "drilldown" : "073" - }, - { - "name" : "072", - "y" : 116, - "drilldown" : "072" - }, - { - "drilldown" : "071", - "y" : 82, - "name" : "071" - }, - { - "drilldown" : "070", - "name" : "070", - "y" : 98 - }, - { - "drilldown" : "069", - "y" : 87, - "name" : "069" - }, - { - "name" : "068", - "y" : 79, - "drilldown" : "068" - }, - { - "drilldown" : "067", - "name" : "067", - "y" : 94 - }, - { - "name" : "066", - "y" : 88, - "drilldown" : "066" - }, - { - "drilldown" : "065", - "y" : 77, - "name" : "065" - }, - { - "name" : "064", - "y" : 84, - "drilldown" : "064" - }, - { - "y" : 93, - "name" : "063", - "drilldown" : "063" - }, - { - "y" : 62, - "name" : "062", - "drilldown" : "062" - }, - { - "drilldown" : "061", - "y" : 85, - "name" : "061" - }, - { - "drilldown" : "060", - "name" : "060", - "y" : 89 - }, - { - "drilldown" : "059", - "y" : 93, - "name" : "059" - }, - { - "drilldown" : "058", - "y" : 71, - "name" : "058" - }, - { - "drilldown" : "057", - "y" : 86, - "name" : "057" - }, - { - "y" : 104, - "name" : "056", - "drilldown" : "056" - }, - { - "drilldown" : "055", - "name" : "055", - "y" : 92 - }, - { - "name" : "054", - "y" : 107, - "drilldown" : "054" - }, - { - "y" : 105, - "name" : "053", - "drilldown" : "053" - }, - { - "drilldown" : "052", - "y" : 93, - "name" : "052" - }, - { - "drilldown" : "051", - "name" : "051", - "y" : 95 - }, - { - "drilldown" : "050", - "name" : "050", - "y" : 104 - }, - { - "nam