From 89c66871b2b57061fd6f12d71e016979e41e23a2 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Thu, 12 Oct 2023 21:43:45 +0100 Subject: - Added solutions by Thomas Kohler. - Added solutions by Andrew Grangaard. - Added solutions by Athanasius. - Added solutions by Arne Sommer. - Added solutions by Robert DiCicco. - Added solutions by Ali Moradi. --- challenge-238/robert-dicicco/powershell/ch-2.psl | 52 + challenge-238/robert-dicicco/python/ch-2.py | 50 + challenge-238/robert-dicicco/raku/ch-2.raku | 50 + challenge-238/spazm/perl/ch-1.pl | 55 + challenge-238/spazm/perl/ch-2.pl | 95 + challenge-238/spazm/perl/task_1_running_sum.pl | 55 - .../spazm/perl/task_2_persistence_sort.pl | 95 - challenge-238/spazm/python/ch-1.py | 66 + challenge-238/spazm/python/ch-2.py | 91 + challenge-238/spazm/python/task_1_running_sum.py | 66 - .../spazm/python/task_2_persistence_sort.py | 91 - stats/pwc-current.json | 277 +- stats/pwc-language-breakdown-summary.json | 42 +- stats/pwc-language-breakdown.json | 9262 ++++++++++---------- stats/pwc-leaders.json | 344 +- stats/pwc-summary-1-30.json | 60 +- stats/pwc-summary-121-150.json | 44 +- stats/pwc-summary-151-180.json | 102 +- stats/pwc-summary-181-210.json | 112 +- stats/pwc-summary-211-240.json | 92 +- stats/pwc-summary-241-270.json | 96 +- stats/pwc-summary-271-300.json | 104 +- stats/pwc-summary-31-60.json | 100 +- stats/pwc-summary-61-90.json | 94 +- stats/pwc-summary-91-120.json | 38 +- stats/pwc-summary.json | 670 +- 26 files changed, 6225 insertions(+), 5978 deletions(-) create mode 100644 challenge-238/robert-dicicco/powershell/ch-2.psl create mode 100644 challenge-238/robert-dicicco/python/ch-2.py create mode 100644 challenge-238/robert-dicicco/raku/ch-2.raku create mode 100755 challenge-238/spazm/perl/ch-1.pl create mode 100755 challenge-238/spazm/perl/ch-2.pl delete mode 100755 challenge-238/spazm/perl/task_1_running_sum.pl delete mode 100755 challenge-238/spazm/perl/task_2_persistence_sort.pl create mode 100755 challenge-238/spazm/python/ch-1.py create mode 100755 challenge-238/spazm/python/ch-2.py delete mode 100755 challenge-238/spazm/python/task_1_running_sum.py delete mode 100755 challenge-238/spazm/python/task_2_persistence_sort.py diff --git a/challenge-238/robert-dicicco/powershell/ch-2.psl b/challenge-238/robert-dicicco/powershell/ch-2.psl new file mode 100644 index 0000000000..81eba4057b --- /dev/null +++ b/challenge-238/robert-dicicco/powershell/ch-2.psl @@ -0,0 +1,52 @@ +#!/usr/bin/env powershell +<# +---------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-10-11 +Challenge 238 Task 02 Persistence Sort ( Powershell ) +---------------------------------------- + #> +$myints = @(( 15, 99, 1, 34),(50, 25, 33, 22)) + +function Reduce ( $num ) { + $steps = 0 + while ( $num -gt 9 ) { + $arr = [int[]](($num -split '') -ne '') + $num = $arr[0] * $arr[1] + $steps += 1 + } + return $steps +} + +foreach ($mints in $myints) { + write-host "Input: @int = [$mints]" + $h = @{} + $cnt = 0 + while ( $cnt -lt $mints.Count) { + $retval = Reduce $mints[$cnt] + $h[$mints[$cnt]] = $retval + $cnt += 1 + } + $h = $h.GetEnumerator() | sort -Property Value,Name + write-host "Output: [" -nonewline + foreach ($k in $h.GetEnumerator() ){ + Write-Host "$($k.Name) " -nonewline + } + write-host "]`n" +} + +<# +---------------------------------------- +SAMPLE OUTPUT + +.\Persistence.ps1 + +Input: @int = [15 99 1 34] +Output: [1 15 34 99 ] + +Input: @int = [50 25 33 22] +Output: [22 33 50 25 ] +---------------------------------------- + #> + + diff --git a/challenge-238/robert-dicicco/python/ch-2.py b/challenge-238/robert-dicicco/python/ch-2.py new file mode 100644 index 0000000000..207a2d4c9b --- /dev/null +++ b/challenge-238/robert-dicicco/python/ch-2.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +''' +---------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-10-12 +Challenge 238 Task 02 Persistence Sort ( Python ) +---------------------------------------- +''' +import math +from operator import itemgetter + +myints = [[15, 99, 1, 34],[50, 25, 33, 22]] + +def Reduce ( num ): + if num < 0 or num > 99: + return 0 + steps = 0; + while num > 9: + num = math.floor(num/10) * (num % 10) + steps += 1 + return steps + +for mints in myints: + print("Input: @int = ",mints) + cnt = 0 + h = {} + while cnt < len(mints): + retval = Reduce(mints[cnt]) + h[mints[cnt]] = retval + cnt += 1 + res = dict(sorted(h.items(), key=itemgetter(1, 0))) + print("Output: [ ", end="") + for key in res.keys(): + print(f"{key} ",end="") + print("]\n") + +''' +---------------------------------------- +SAMPLE OUTPUT +python .\Persistence.py + +Input: @int = [15, 99, 1, 34] +Output: [ 1 15 34 99 ] + +Input: @int = [50, 25, 33, 22] +Output: [ 22 33 50 25 ] +---------------------------------------- +''' + + diff --git a/challenge-238/robert-dicicco/raku/ch-2.raku b/challenge-238/robert-dicicco/raku/ch-2.raku new file mode 100644 index 0000000000..dad5f5b59d --- /dev/null +++ b/challenge-238/robert-dicicco/raku/ch-2.raku @@ -0,0 +1,50 @@ +#!/usr/bin/env raku +=begin comment +---------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-10-12 +Challenge 238 Task 02 Persistence Sort ( Raku ) +---------------------------------------- +=end comment + +my @myints = ([15, 99, 1, 34],[50, 25, 33, 22]); + +sub Reduce ( $num is copy) { + if $num < 0 or $num > 99 {return 0;} + my $steps = 0; + while $num > 9 { + $num = (floor($num/10)) * ($num % 10); + $steps++; + } + return $steps; +} + +for (@myints) -> @mints { + my $cnt = 0; + my %h; + say "Input: @int = ["~@mints~"]"; + while $cnt < @mints.elems { + my $retval = Reduce(@mints[$cnt]); + %h{@mints[$cnt]} = $retval; + $cnt++; + } + print "Output: [ "; + for %h.sort: *.invert { + print .key ~ " "; + } + say "]\n"; +} + +=begin comment +---------------------------------------- +SAMPLE OUTPUT +raku .\Persistence.rk + +Input: @int = [15 99 1 34] +Output: [ 1 15 34 99 ] + +Input: @int = [50 25 33 22] +Output: [ 22 33 50 25 ] +---------------------------------------- +=end comment + diff --git a/challenge-238/spazm/perl/ch-1.pl b/challenge-238/spazm/perl/ch-1.pl new file mode 100755 index 0000000000..e640ec52ef --- /dev/null +++ b/challenge-238/spazm/perl/ch-1.pl @@ -0,0 +1,55 @@ +#!/usr/bin/env perl + +use 5.36.0; +use Test::More; + +=pod + You are given an array of integers. + + Write a script to return the running sum of the given array. + The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i] + + Example 1 + Input: @int = (1, 2, 3, 4, 5) + Output: (1, 3, 6, 10, 15) + >>> assert (1, 3, 6, 10, 15) == running_sum([1, 2, 3, 4, 5]) + Example 2 + Input: @int = (1, 1, 1, 1, 1) + Output: (1, 2, 3, 4, 5) + >>> assert (1, 2, 3, 4, 5) == running_sum([1, 1, 1, 1, 1]) + Example 3 + Input: @int = (0, -1, 1, 2) + Output: (0, -1, 0, 2) + >>> assert ( 0, -1, 0, 2) == running_sum([0, -1, 1, 2]) +=cut + +sub running_sum (@nums) +{ + my $current_sum = 0; + my @running_sum = (); + for my $i (@nums) + { + $current_sum += $i; + push @running_sum, $current_sum; + } + return @running_sum; +} + +sub test() +{ + my $tests = [ + [ [ 1, 2, 3, 4, 5 ], [ 1, 3, 6, 10, 15 ] ], + [ [ 1, 1, 1, 1, 1 ], [ 1, 2, 3, 4, 5 ] ], + [ [ 0, -1, 1, 2 ], [ 0, -1, 0, 2 ] ], + ]; + for my $test (@$tests) + { + my ( $input, $expected ) = @$test; + is_deeply [ running_sum(@$input) ], $expected, + "input: @$input, expected: @$expected"; + } + done_testing(); +} + +test() if not caller(); +1; diff --git a/challenge-238/spazm/perl/ch-2.pl b/challenge-238/spazm/perl/ch-2.pl new file mode 100755 index 0000000000..989509871a --- /dev/null +++ b/challenge-238/spazm/perl/ch-2.pl @@ -0,0 +1,95 @@ +#!/usr/bin/env perl + +use 5.36.0; +use Test::More; +use Data::Dumper; + +=pod + You are given an array of positive integers. + + Write a script to sort the given array in increasing order with respect to + the count of steps required to obtain a single-digit number by multiplying + its digits recursively for each array element. If any two numbers have the + same count of steps, then print the smaller number first. + + Example 1 + Input: @int = (15, 99, 1, 34) + Output: (1, 15, 34, 99) + + >>> persistence_sort([15, 99, 1, 34]) == [1, 15, 34, 99] + + 15 => 1 x 5 => 5 (1 step) + 99 => 9 x 9 => 81 => 8 x 1 => 8 (2 steps) + 1 => 0 step + 34 => 3 x 4 => 12 => 1 x 2 => 2 (2 steps) + Example 2 + Input: @int = (50, 25, 33, 22) + Output: (22, 33, 50, 25) + + 50 => 5 x 0 => 0 (1 step) + 25 => 2 x 5 => 10 => 1 x 0 => 0 (2 steps) + 33 => 3 x 3 => 9 (1 step) + 22 => 2 x 2 => 4 (1 step) +=cut + +sub persistence_sort (@nums) +{ + return map { $_->[1] } + sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } + map { [ single_digit_multiplication_steps($_), $_ ] } @nums; +} + +=pod + Given a multiple-digit number, multiply its digits recursively and return + the number of steps required to obtain a single-digit number. + + >>> single_digit_multiplication_steps(50) == 1 + >>> single_digit_multiplication_steps(25) == 2 + >>> single_digit_multiplication_steps(33) == 1 + >>> single_digit_multiplication_steps(22) == 1 + >>> single_digit_multiplication_steps(99) == 2 + >>> single_digit_multiplication_steps(81) == 1 + >>> single_digit_multiplication_steps(14) == 1 + >>> single_digit_multiplication_steps(98) == 3 + >>> single_digit_multiplication_steps(72) == 2 + >>> single_digit_multiplication_steps(14) == 1 +=cut + +sub single_digit_multiplication_steps ($num) +{ + my $product = 1; + for my $digit ( split( //, "$num" ) ) + { + $product *= int($digit); + } + + return $product < 10 + ? 1 + : 1 + single_digit_multiplication_steps($product); +} + +sub test() +{ + my $multiplication_steps_tests = [ + [ 50, 1 ], [ 25, 2 ], [ 33, 1 ], [ 22, 1 ], [ 99, 2 ], [ 81, 1 ], + [ 98, 3 ], [ 72, 2 ], [ 14, 1 ], + ]; + for my $test (@$multiplication_steps_tests) + { + my ( $input, $expected ) = @$test; + is_deeply $expected, single_digit_multiplication_steps($input), + "input: $input, expected: $expected"; + } + my $persistence_sort_tests = [ [ [ 15, 99, 1, 34 ], [ 1, 15, 34, 99 ] ] ]; + for my $test (@$persistence_sort_tests) + { + my ( $input, $expected ) = @$test; + my $output = [ persistence_sort(@$input) ]; + is_deeply $expected, $output, + "input: @$input, expected: @$expected, output: @$output"; + } + done_testing; +} + +test() unless caller(); +1; diff --git a/challenge-238/spazm/perl/task_1_running_sum.pl b/challenge-238/spazm/perl/task_1_running_sum.pl deleted file mode 100755 index e640ec52ef..0000000000 --- a/challenge-238/spazm/perl/task_1_running_sum.pl +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env perl - -use 5.36.0; -use Test::More; - -=pod - You are given an array of integers. - - Write a script to return the running sum of the given array. - The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i] - - Example 1 - Input: @int = (1, 2, 3, 4, 5) - Output: (1, 3, 6, 10, 15) - >>> assert (1, 3, 6, 10, 15) == running_sum([1, 2, 3, 4, 5]) - Example 2 - Input: @int = (1, 1, 1, 1, 1) - Output: (1, 2, 3, 4, 5) - >>> assert (1, 2, 3, 4, 5) == running_sum([1, 1, 1, 1, 1]) - Example 3 - Input: @int = (0, -1, 1, 2) - Output: (0, -1, 0, 2) - >>> assert ( 0, -1, 0, 2) == running_sum([0, -1, 1, 2]) -=cut - -sub running_sum (@nums) -{ - my $current_sum = 0; - my @running_sum = (); - for my $i (@nums) - { - $current_sum += $i; - push @running_sum, $current_sum; - } - return @running_sum; -} - -sub test() -{ - my $tests = [ - [ [ 1, 2, 3, 4, 5 ], [ 1, 3, 6, 10, 15 ] ], - [ [ 1, 1, 1, 1, 1 ], [ 1, 2, 3, 4, 5 ] ], - [ [ 0, -1, 1, 2 ], [ 0, -1, 0, 2 ] ], - ]; - for my $test (@$tests) - { - my ( $input, $expected ) = @$test; - is_deeply [ running_sum(@$input) ], $expected, - "input: @$input, expected: @$expected"; - } - done_testing(); -} - -test() if not caller(); -1; diff --git a/challenge-238/spazm/perl/task_2_persistence_sort.pl b/challenge-238/spazm/perl/task_2_persistence_sort.pl deleted file mode 100755 index 989509871a..0000000000 --- a/challenge-238/spazm/perl/task_2_persistence_sort.pl +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env perl - -use 5.36.0; -use Test::More; -use Data::Dumper; - -=pod - You are given an array of positive integers. - - Write a script to sort the given array in increasing order with respect to - the count of steps required to obtain a single-digit number by multiplying - its digits recursively for each array element. If any two numbers have the - same count of steps, then print the smaller number first. - - Example 1 - Input: @int = (15, 99, 1, 34) - Output: (1, 15, 34, 99) - - >>> persistence_sort([15, 99, 1, 34]) == [1, 15, 34, 99] - - 15 => 1 x 5 => 5 (1 step) - 99 => 9 x 9 => 81 => 8 x 1 => 8 (2 steps) - 1 => 0 step - 34 => 3 x 4 => 12 => 1 x 2 => 2 (2 steps) - Example 2 - Input: @int = (50, 25, 33, 22) - Output: (22, 33, 50, 25) - - 50 => 5 x 0 => 0 (1 step) - 25 => 2 x 5 => 10 => 1 x 0 => 0 (2 steps) - 33 => 3 x 3 => 9 (1 step) - 22 => 2 x 2 => 4 (1 step) -=cut - -sub persistence_sort (@nums) -{ - return map { $_->[1] } - sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } - map { [ single_digit_multiplication_steps($_), $_ ] } @nums; -} - -=pod - Given a multiple-digit number, multiply its digits recursively and return - the number of steps required to obtain a single-digit number. - - >>> single_digit_multiplication_steps(50) == 1 - >>> single_digit_multiplication_steps(25) == 2 - >>> single_digit_multiplication_steps(33) == 1 - >>> single_digit_multiplication_steps(22) == 1 - >>> single_digit_multiplication_steps(99) == 2 - >>> single_digit_multiplication_steps(81) == 1 - >>> single_digit_multiplication_steps(14) == 1 - >>> single_digit_multiplication_steps(98) == 3 - >>> single_digit_multiplication_steps(72) == 2 - >>> single_digit_multiplication_steps(14) == 1 -=cut - -sub single_digit_multiplication_steps ($num) -{ - my $product = 1; - for my $digit ( split( //, "$num" ) ) - { - $product *= int($digit); - } - - return $product < 10 - ? 1 - : 1 + single_digit_multiplication_steps($product); -} - -sub test() -{ - my $multiplication_steps_tests = [ - [ 50, 1 ], [ 25, 2 ], [ 33, 1 ], [ 22, 1 ], [ 99, 2 ], [ 81, 1 ], - [ 98, 3 ], [ 72, 2 ], [ 14, 1 ], - ]; - for my $test (@$multiplication_steps_tests) - { - my ( $input, $expected ) = @$test; - is_deeply $expected, single_digit_multiplication_steps($input), - "input: $input, expected: $expected"; - } - my $persistence_sort_tests = [ [ [ 15, 99, 1, 34 ], [ 1, 15, 34, 99 ] ] ]; - for my $test (@$persistence_sort_tests) - { - my ( $input, $expected ) = @$test; - my $output = [ persistence_sort(@$input) ]; - is_deeply $expected, $output, - "input: @$input, expected: @$expected, output: @$output"; - } - done_testing; -} - -test() unless caller(); -1; diff --git a/challenge-238/spazm/python/ch-1.py b/challenge-238/spazm/python/ch-1.py new file mode 100755 index 0000000000..391fb82cfa --- /dev/null +++ b/challenge-238/spazm/python/ch-1.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 + +from typing import Iterable + + +def running_sum(nums: list[int]) -> list[int]: + """ + You are given an array of integers. + + Write a script to return the running sum of the given array. + The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i] + + Example 1 + Input: @int = (1, 2, 3, 4, 5) + Output: (1, 3, 6, 10, 15) + >>> assert (1, 3, 6, 10, 15) == running_sum([1, 2, 3, 4, 5]) + Example 2 + Input: @int = (1, 1, 1, 1, 1) + Output: (1, 2, 3, 4, 5) + >>> assert (1, 2, 3, 4, 5) == running_sum([1, 1, 1, 1, 1]) + Example 3 + Input: @int = (0, -1, 1, 2) + Output: (0, -1, 0, 2) + >>> assert ( 0, -1, 0, 2) == running_sum([0, -1, 1, 2]) + """ + return list(running_sum_it(nums)) + + +def running_sum_it(nums: list[int]) -> Iterable[int]: + """ + You are given an array of integers. + + return an iterator of the running sum of the given array. + The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i] + + Example 1 + Input: @int = (1, 2, 3, 4, 5) + Output: (1, 3, 6, 10, 15) + >>> assert (1, 3, 6, 10, 15) == list(running_sum([1, 2, 3, 4, 5])) + Example 2 + Input: @int = (1, 1, 1, 1, 1) + Output: (1, 2, 3, 4, 5) + >>> assert (1, 2, 3, 4, 5) == list(running_sum([1, 1, 1, 1, 1])) + Example 3 + Input: @int = (0, -1, 1, 2) + Output: (0, -1, 0, 2) + >>> assert ( 0, -1, 0, 2) == list(running_sum([0, -1, 1, 2])) + """ + + current_sum = 0 + for i in nums: + current_sum += i + yield current_sum + + +if __name__ == "__main__": + import unittest + + tests = [ + ([1, 2, 3, 4, 5], [1, 3, 6, 10, 15]), + ([1, 1, 1, 1, 1], [1, 2, 3, 4, 5]), + ([0, -1, 1, 2], [0, -1, 0, 2]), + ] + tester = unittest.TestCase() + for input, expected in tests: + tester.assertEqual(expected, running_sum(input)) diff --git a/challenge-238/spazm/python/ch-2.py b/challenge-238/spazm/python/ch-2.py new file mode 100755 index 0000000000..1278bac699 --- /dev/null +++ b/challenge-238/spazm/python/ch-2.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python3 + + +def persistence_sort(ints: list[int]) -> list[int]: + """ + You are given an array of positive integers. + + Write a script to sort the given array in increasing order with respect to + the count of steps required to obtain a single-digit number by multiplying + its digits recursively for each array element. If any two numbers have the + same count of steps, then print the smaller number first. + + Example 1 + Input: @int = (15, 99, 1, 34) + Output: (1, 15, 34, 99) + + >>> persistence_sort([15, 99, 1, 34]) == [1, 15, 34, 99] + + 15 => 1 x 5 => 5 (1 step) + 99 => 9 x 9 => 81 => 8 x 1 => 8 (2 steps) + 1 => 0 step + 34 => 3 x 4 => 12 => 1 x 2 => 2 (2 steps) + Example 2 + Input: @int = (50, 25, 33, 22) + Output: (22, 33, 50, 25) + + 50 => 5 x 0 => 0 (1 step) + 25 => 2 x 5 => 10 => 1 x 0 => 0 (2 steps) + 33 => 3 x 3 => 9 (1 step) + 22 => 2 x 2 => 4 (1 step) + """ + + return sorted(ints, key=persistence_sort_key) + + +def persistence_sort_key(x): + steps_x = single_digit_multiplication_steps(x) + return (steps_x, x) + + +def single_digit_multiplication_steps(num: int) -> int: + """ + Given a multiple-digit number, multiply its digits recursively and return + the number of steps required to obtain a single-digit number. + + >>> single_digit_multiplication_steps(50) == 1 + >>> single_digit_multiplication_steps(25) == 2 + >>> single_digit_multiplication_steps(33) == 1 + >>> single_digit_multiplication_steps(22) == 1 + >>> single_digit_multiplication_steps(99) == 2 + >>> single_digit_multiplication_steps(81) == 1 + >>> single_digit_multiplication_steps(14) == 1 + >>> single_digit_multiplication_steps(98) == 3 + >>> single_digit_multiplication_steps(72) == 2 + >>> single_digit_multiplication_steps(14) == 1 + """ + + product = 1 + for digit in str(num): + product *= int(digit) + + if product < 10: + return 1 + else: + return 1 + single_digit_multiplication_steps(product) + + +if __name__ == "__main__": + import unittest + + tester = unittest.TestCase() + + multiplication_steps_tests = [ + (50, 1), + (25, 2), + (33, 1), + (22, 1), + (99, 2), + (81, 1), + (98, 3), + (72, 2), + (14, 1), + ] + for input, expected in multiplication_steps_tests: + tester.assertEqual( + expected, single_digit_multiplication_steps(input), f"input: {input}" + ) + + persistence_sort_tests = [([15, 99, 1, 34], [1, 15, 34, 99])] + for input, expected in persistence_sort_tests: + tester.assertEqual(expected, persistence_sort(input), f"input: {input}") diff --git a/challenge-238/spazm/python/task_1_running_sum.py b/challenge-238/spazm/python/task_1_running_sum.py deleted file mode 100755 index 391fb82cfa..0000000000 --- a/challenge-238/spazm/python/task_1_running_sum.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python3 - -from typing import Iterable - - -def running_sum(nums: list[int]) -> list[int]: - """ - You are given an array of integers. - - Write a script to return the running sum of the given array. - The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i] - - Example 1 - Input: @int = (1, 2, 3, 4, 5) - Output: (1, 3, 6, 10, 15) - >>> assert (1, 3, 6, 10, 15) == running_sum([1, 2, 3, 4, 5]) - Example 2 - Input: @int = (1, 1, 1, 1, 1) - Output: (1, 2, 3, 4, 5) - >>> assert (1, 2, 3, 4, 5) == running_sum([1, 1, 1, 1, 1]) - Example 3 - Input: @int = (0, -1, 1, 2) - Output: (0, -1, 0, 2) - >>> assert ( 0, -1, 0, 2) == running_sum([0, -1, 1, 2]) - """ - return list(running_sum_it(nums)) - - -def running_sum_it(nums: list[int]) -> Iterable[int]: - """ - You are given an array of integers. - - return an iterator of the running sum of the given array. - The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i] - - Example 1 - Input: @int = (1, 2, 3, 4, 5) - Output: (1, 3, 6, 10, 15) - >>> assert (1, 3, 6, 10, 15) == list(running_sum([1, 2, 3, 4, 5])) - Example 2 - Input: @int = (1, 1, 1, 1, 1) - Output: (1, 2, 3, 4, 5) - >>> assert (1, 2, 3, 4, 5) == list(running_sum([1, 1, 1, 1, 1])) - Example 3 - Input: @int = (0, -1, 1, 2) - Output: (0, -1, 0, 2) - >>> assert ( 0, -1, 0, 2) == list(running_sum([0, -1, 1, 2])) - """ - - current_sum = 0 - for i in nums: - current_sum += i - yield current_sum - - -if __name__ == "__main__": - import unittest - - tests = [ - ([1, 2, 3, 4, 5], [1, 3, 6, 10, 15]), - ([1, 1, 1, 1, 1], [1, 2, 3, 4, 5]), - ([0, -1, 1, 2], [0, -1, 0, 2]), - ] - tester = unittest.TestCase() - for input, expected in tests: - tester.assertEqual(expected, running_sum(input)) diff --git a/challenge-238/spazm/python/task_2_persistence_sort.py b/challenge-238/spazm/python/task_2_persistence_sort.py deleted file mode 100755 index 1278bac699..0000000000 --- a/challenge-238/spazm/python/task_2_persistence_sort.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python3 - - -def persistence_sort(ints: list[int]) -> list[int]: - """ - You are given an array of positive integers. - - Write a script to sort the given array in increasing order with respect to - the count of steps required to obtain a single-digit number by multiplying - its digits recursively for each array element. If any two numbers have the - same count of steps, then print the smaller number first. - - Example 1 - Input: @int = (15, 99, 1, 34) - Output: (1, 15, 34, 99) - - >>> persistence_sort([15, 99, 1, 34]) == [1, 15, 34, 99] - - 15 => 1 x 5 => 5 (1 step) - 99 => 9 x 9 => 81 => 8 x 1 => 8 (2 steps) - 1 => 0 step - 34 => 3 x 4 => 12 => 1 x 2 => 2 (2 steps) - Example 2 - Input: @int = (50, 25, 33, 22) - Output: (22, 33, 50, 25) - - 50 => 5 x 0 => 0 (1 step) - 25 => 2 x 5 => 10 => 1 x 0 => 0 (2 steps) - 33 => 3 x 3 => 9 (1 step) - 22 => 2 x 2 => 4 (1 step) - """ - - return sorted(ints, key=persistence_sort_key) - - -def persistence_sort_key(x): - steps_x = single_digit_multiplication_steps(x) - return (steps_x, x) - - -def single_digit_multiplication_steps(num: int) -> int: - """ - Given a multiple-digit number, multiply its digits recursively and return - the number of steps required to obtain a single-digit number. - - >>> single_digit_multiplication_steps(50) == 1 - >>> single_digit_multiplication_steps(25) == 2 - >>> single_digit_multiplication_steps(33) == 1 - >>> single_digit_multiplication_steps(22) == 1 - >>> single_digit_multiplication_steps(99) == 2 - >>> single_digit_multiplication_steps(81) == 1 - >>> single_digit_multiplication_steps(14) == 1 - >>> single_digit_multiplication_steps(98) == 3 - >>> single_digit_multiplication_steps(72) == 2 - >>> single_digit_multiplication_steps(14) == 1 - """ - - product = 1 - for digit in str(num): - product *= int(digit) - - if product < 10: - return 1 - else: - return 1 + single_digit_multiplication_steps(product) - - -if __name__ == "__main__": - import unittest - - tester = unittest.TestCase() - - multiplication_steps_tests = [ - (50, 1), - (25, 2), - (33, 1), - (22, 1), - (99, 2), - (81, 1), - (98, 3), - (72, 2), - (14, 1), - ] - for input, expected in multiplication_steps_tests: - tester.assertEqual( - expected, single_digit_multiplication_steps(input), f"input: {input}" - ) - - persistence_sort_tests = [([15, 99, 1, 34], [1, 15, 34, 99])] - for input, expected in persistence_sort_tests: - tester.assertEqual(expected, persistence_sort(input), f"input: {input}") diff --git a/stats/pwc-current.json b/stats/pwc-current.json index a5e6ca1d04..171751b13f 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,21 +1,72 @@ { + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, "drilldown" : { "series" : [ { - "id" : "Bob Lied", + "id" : "Ali Moradi", "data" : [ [ "Perl", 2 ], + [ + "Raku", + 2 + ], [ "Blog", 1 ] ], - "name" : "Bob Lied" + "name" : "Ali Moradi" }, { + "id" : "Andrew Grangaard", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Andrew Grangaard" + }, + { + "id" : "Arne Sommer", + "name" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Athanasius", + "name" : "Athanasius", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Bob Lied", "data" : [ [ "Perl", @@ -26,18 +77,31 @@ 1 ] ], + "id" : "Bob Lied" + }, + { "name" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], "id" : "Dave Jacoby" }, { + "id" : "David Ferrone", "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ], - "id" : "David Ferrone" + ] }, { "name" : "E. Choroba", @@ -50,14 +114,14 @@ "id" : "E. Choroba" }, { + "id" : "Humberto Massa", "name" : "Humberto Massa", "data" : [ [ "Raku", 2 ] - ], - "id" : "Humberto Massa" + ] }, { "data" : [ @@ -70,6 +134,7 @@ "id" : "Lance Wicks" }, { + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -84,11 +149,11 @@ 2 ] ], - "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld" }, { "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -102,11 +167,9 @@ "Blog", 1 ] - ], - "name" : "Lubos Kolouch" + ] }, { - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -117,27 +180,28 @@ 7 ] ], - "name" : "Luca Ferrari" + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" }, { - "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], + "name" : "Mark Anderson", "id" : "Mark Anderson" }, { - "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] ], - "id" : "Matthew Neleigh" + "name" : "Matthew Neleigh" }, { "data" : [ @@ -150,6 +214,8 @@ "id" : "Niels van Dijke" }, { + "id" : "Packy Anderson", + "name" : "Packy Anderson", "data" : [ [ "Perl", @@ -163,12 +229,9 @@ "Blog", 1 ] - ], - "name" : "Packy Anderson", - "id" : "Packy Anderson" + ] }, { - "id" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -179,20 +242,21 @@ 1 ] ], - "name" : "Peter Campbell Smith" + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith" }, { - "id" : "Peter Meszaros", - "name" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Peter Meszaros", + "id" : "Peter Meszaros" }, { - "name" : "Robbie Hatley", + "id" : "Robbie Hatley", "data" : [ [ "Perl", @@ -203,11 +267,9 @@ 1 ] ], - "id" : "Robbie Hatley" + "name" : "Robbie Hatley" }, { - "id" : "Robert DiCicco", - "name" : "Robert DiCicco", "data" : [ [ "Perl", @@ -215,12 +277,14 @@ ], [ "Raku", - 1 + 2 ] - ] + ], + "name" : "Robert DiCicco", + "id" : "Robert DiCicco" }, { - "name" : "Roger Bell_West", + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -231,9 +295,24 @@ 2 ] ], - "id" : "Roger Bell_West" + "name" : "Roger Bell_West" }, { + "id" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Thomas Kohler" + }, + { + "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -244,11 +323,10 @@ 2 ] ], - "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke" + "name" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -259,99 +337,104 @@ 1 ] ], - "id" : "W. Luis Mochan" + "name" : "W. Luis Mochan" } ] }, - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
", - "followPointer" : 1 - }, - "xAxis" : { - "type" : "category" - }, - "title" : { - "text" : "The Weekly Challenge - 238" - }, "chart" : { "type" : "column" }, - "legend" : { - "enabled" : 0 - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "title" : { + "text" : "The Weekly Challenge - 238" }, "series" : [ { + "colorByPoint" : 1, "data" : [ { - "name" : "Bob Lied", - "drilldown" : "Bob Lied", - "y" : 3 + "name" : "Ali Moradi", + "y" : 5, + "drilldown" : "Ali Moradi" + }, + { + "y" : 2, + "drilldown" : "Andrew Grangaard", + "name" : "Andrew Grangaard" + }, + { + "y" : 3, + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" }, { "y" : 3, + "drilldown" : "Bob Lied", + "name" : "Bob Lied" + }, + { + "name" : "Dave Jacoby", "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" + "y" : 3 }, { - "y" : 2, + "name" : "David Ferrone", "drilldown" : "David Ferrone", - "name" : "David Ferrone" + "y" : 2 }, { "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 + "y" : 2, + "drilldown" : "E. Choroba" }, { + "name" : "Humberto Massa", "drilldown" : "Humberto Massa", - "y" : 2, - "name" : "Humberto Massa" + "y" : 2 }, { "name" : "Lance Wicks", - "y" : 1, - "drilldown" : "Lance Wicks" + "drilldown" : "Lance Wicks", + "y" : 1 }, { + "name" : "Laurent Rosenfeld", "drilldown" : "Laurent Rosenfeld", - "y" : 6, - "name" : "Laurent Rosenfeld" + "y" : 6 }, { - "y" : 5, + "name" : "Lubos Kolouch", "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "y" : 5 }, { - "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari", "y" : 9, - "drilldown" : "Luca Ferrari" + "name" : "Luca Ferrari" }, { - "y" : 2, + "name" : "Mark Anderson", "drilldown" : "Mark Anderson", - "name" : "Mark Anderson" + "y" : 2 }, { - "y" : 2, + "name" : "Matthew Neleigh", "drilldown" : "Matthew Neleigh", - "name" : "Matthew Neleigh" + "y" : 2 }, { "name" : "Niels van Dijke", - "y" : 2, - "drilldown" : "Niels van Dijke" + "drilldown" : "Niels van Dijke", + "y" : 2 }, { - "name" : "Packy Anderson", + "y" : 5, "drilldown" : "Packy Anderson", - "y" : 5 + "name" : "Packy Anderson" }, { "drilldown" : "Peter Campbell Smith", @@ -359,28 +442,33 @@ "name" : "Peter Campbell Smith" }, { + "name" : "Peter Meszaros", "y" : 2, - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros" + "drilldown" : "Peter Meszaros" }, { - "y" : 3, + "name" : "Robbie Hatley", "drilldown" : "Robbie Hatley", - "name" : "Robbie Hatley" + "y" : 3 }, { + "y" : 4, "drilldown" : "Robert DiCicco", - "y" : 3, "name" : "Robert DiCicco" }, { - "drilldown" : "Roger Bell_West", "y" : 4, + "drilldown" : "Roger Bell_West", "name" : "Roger Bell_West" }, { - "drilldown" : "Ulrich Rieke", + "drilldown" : "Thomas Kohler", "y" : 4, + "name" : "Thomas Kohler" + }, + { + "y" : 4, + "drilldown" : "Ulrich Rieke", "name" : "Ulrich Rieke" }, { @@ -389,20 +477,27 @@ "drilldown" : "W. Luis Mochan" } ], - "name" : "The Weekly Challenge - 238", - "colorByPoint" : 1 + "name" : "The Weekly Challenge - 238" } ], - "subtitle" : { - "text" : "[Champions: 20] Last updated at 2023-10-11 18:18:52 GMT" + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 }, "plotOptions" : { "series" : { "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 + "enabled" : 1, + "format" : "{point.y}" }, "borderWidth" : 0 } + }, + "subtitle" : { + "text" : "[Champions: 25] Last updated at 2023-10-12 20:39:38 GMT" + }, + "legend" : { + "enabled" : 0 } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 9446d89d73..cf1a6a7ffd 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -5,59 +5,59 @@ }, "min" : 0 }, - "subtitle" : { - "text" : "Last updated at 2023-10-11 18:18:52 GMT" + "xAxis" : { + "type" : "category", + "labels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + } + } }, "series" : [ { "dataLabels" : { - "rotation" : -90, "enabled" : "true", + "rotation" : -90, + "align" : "right", "y" : 10, - "format" : "{point.y:.0f}", "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" }, - "align" : "right", + "format" : "{point.y:.0f}", "color" : "#FFFFFF" }, + "name" : "Contributions", "data" : [ [ "Blog", - 4053 + 4057 ], [ "Perl", - 12233 + 12241 ], [ "Raku", - 7042 + 7049 ] - ], - "name" : "Contributions" + ] } ], - "xAxis" : { - "labels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } - }, - "type" : "category" - }, "tooltip" : { "pointFormat" : "{point.y:.0f}" }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" + "subtitle" : { + "text" : "Last updated at 2023-10-12 20:39:38 GMT" }, "legend" : { "enabled" : "false" }, "chart" : { "type" : "column" + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index dd73dcb7a0..9b1d63a46c 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,4302 +1,13 @@ { - "xAxis" : { - "type" : "category" - }, - "tooltip" : { - "followPointer" : "true", - "headerFormat" : "", - "pointFormat" : "Challenge {point.name}: {point.y:f}
" - }, - "drilldown" : { - "series" : [ - { - "data" : [ - [ - "Perl", - 105 - ], - [ - "Raku", - 47 - ], - [ - "Blog", - 12 - ] - ], - "name" : "001", - "id" : "001" - }, - { - "name" : "002", - "data" : [ - [ - "Perl", - 83 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 10 - ] - ], - "id" : "002" - }, - { - "id" : "003", - "name" : "003", - "data" : [ - [ - "Perl", - 48 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "004", - "data" : [ - [ - "Perl", - 60 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ], - "name" : "004" - }, - { - "id" : "005", - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 12 - ] - ], - "name" : "005" - }, - { - "id" : "006", - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 18 - ], - [ - "Blog", - 7 - ] - ], - "name" : "006" - }, - { - "id" : "007", - "name" : "007", - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 48 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 12 - ] - ], - "name" : "008", - "id" : "008" - }, - { - "id" : "009", - "data" : [ - [ - "Perl", - 46 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 13 - ] - ], - "name" : "009" - }, - { - "name" : "010", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 11 - ] - ], - "id" : "010" - }, - { - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 10 - ] - ], - "name" : "011", - "id" : "011" - }, - { - "id" : "012", - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 11 - ] - ], - "name" : "012" - }, - { - "id" : "013", - "name" : "013", - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 25 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "name" : "014", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 15 - ] - ], - "id" : "014" - }, - { - "data" : [ - [ - "Perl", - 58 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 15 - ] - ], - "name" : "015", - "id" : "015" - }, - { - "id" : "016", - "name" : "016", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "id" : "017", - "name" : "017", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "name" : "018", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 14 - ] - ], - "id" : "018" - }, - { - "id" : "019", - "name" : "019", - "data" : [ - [ - "Perl", - 58 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 13 - ] - ], - "name" : "020", - "id" : "020" - }, - { - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ], - "name" : "021", - "id" : "021" - }, - { - "name" : "022", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ], - "id" : "022" - }, - { - "id" : "023", - "name" : "023", - "data" : [ - [ - "Perl", - 57 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "name" : "024", - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 11 - ] - ], - "id" : "024" - }, - { - "name" : "025", - "data" : [ - [ - "Perl", - 31 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 12 - ] - ], - "id" : "025" - }, - { - "id" : "026", - "name" : "026", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 29 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ], - "name" : "027", - "id" : "027" - }, - { - "id" : "028", - "name" : "028", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "029", - "name" : "029", - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "id" : "030", - "data" : [ - [ - "Perl", - 78 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ], - "name" : "030" - }, - { - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ], - "name" : "031", - "id" : "031" - }, - { - "id" : "032", - "name" : "032", - "data" : [ - [ - "Perl", - 61 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "033", - "data" : [ - [ - "Perl", - 66 - ], - [ - "Raku", - 38 - ], - [ - "Blog", - 10 - ] - ], - "name" : "033" - }, - { - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 11 - ] - ], - "name" : "034", - "id" : "034" - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ], - "name" : "035", - "id" : "035" - }, - { - "name" : "036", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 11 - ] - ], - "id" : "036" - }, - { - "id" : "037", - "name" : "037", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "038", - "name" : "038", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "id" : "039", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 12 - ] - ], - "name" : "039" - }, - { - "name" : "040", - "data" : [ - [ - "Perl", - 43 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ], - "id" : "040" - }, - { - "id" : "041", - "name" : "041", - "data" : [ - [ - "Perl", - 41 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "042", - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 11 - ] - ], - "name" : "042" - }, - { - "id" : "043", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 11 - ] - ], - "name" : "043" - }, - { - "id" : "044", - "name" : "044", - "data" : [ - [ - "Perl", - 46 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "045", - "name" : "045", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 35 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "046", - "name" : "046", - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "047", - "name" : "047", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 63 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 12 - ] - ], - "name" : "048", - "id" : "048" - }, - { - "id" : "049", - "name" : "049", - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "name" : "050", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 12 - ] - ], - "id" : "050" - }, - { - "id" : "051", - "name" : "051", - "data" : [ - [ - "Perl", - 52 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "052", - "name" : "052", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 14 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 41 - ], - [ - "Blog", - 15 - ] - ], - "name" : "053", - "id" : "053" - }, - { - "id" : "054", - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 40 - ], - [ - "Blog", - 18 - ] - ], - "name" : "054" - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 14 - ] - ], - "name" : "055", - "id" : "055" - }, - { - "name" : "056", - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 17 - ] - ], - "id" : "056" - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 15 - ] - ], - "name" : "057", - "id" : "057" - }, - { - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 13 - ] - ], - "name" : "058", - "id" : "058" - }, - { - "id" : "059", - "name" : "059", - "data" : [ -