From 2b586bbcfa9f30c6f6548aaadddd665b2d80198f Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 11 Jul 2023 09:52:16 +0100 Subject: - Added solutions by Robert DiCicco. - Added solutions by Laurent Rosenfeld. - Added solutions by Ulrich Rieke. - Added solutions by Jaldhar H. Vyas. - Added solutions by W. Luis Mochan. - Added solutions by Robbie Hatley. - Added solutions by Mark Anderson. - Added solutions by David Ferrone. - Added solutions by Andreas Voegele. - Added solutions by Lubos Kolouch. - Added solutions by Thomas Kohler. --- challenge-225/eric-cheung/python/ch-1.py | 8 + challenge-225/eric-cheung/python/ch-2.py | 19 + challenge-225/laurent-rosenfeld/blog.txt | 1 + challenge-225/laurent-rosenfeld/perl/ch-1.pl | 25 + challenge-225/laurent-rosenfeld/raku/ch-1.raku | 21 + challenge-225/robert-dicicco/julia/ch-1.jl | 51 + challenge-225/robert-dicicco/perl/ch-1.pl | 55 + challenge-225/robert-dicicco/python/ch-1.py | 39 + challenge-225/robert-dicicco/raku/ch-1.raku | 47 + challenge-225/robert-dicicco/ruby/ch-1.rb | 44 + challenge-225/ulrich-rieke/cpp/ch-1.cpp | 42 + challenge-225/ulrich-rieke/cpp/ch-2.cpp | 78 + challenge-225/ulrich-rieke/haskell/ch-1.hs | 32 + challenge-225/ulrich-rieke/haskell/ch-2.hs | 33 + challenge-225/ulrich-rieke/perl/ch-1.pl | 27 + challenge-225/ulrich-rieke/perl/ch-2.pl | 60 + challenge-225/ulrich-rieke/raku/ch-1.raku | 15 + challenge-225/ulrich-rieke/raku/ch-2.raku | 56 + challenge-225/ulrich-rieke/rust/ch-1.rs | 26 + challenge-225/ulrich-rieke/rust/ch-2.rs | 58 + stats/pwc-challenge-165.json | 413 ++-- stats/pwc-challenge-166.json | 447 ++-- stats/pwc-challenge-224.json | 518 ++++ stats/pwc-current.json | 379 +-- stats/pwc-language-breakdown-summary.json | 54 +- stats/pwc-language-breakdown.json | 2989 ++++++++++++------------ stats/pwc-leaders.json | 764 +++--- stats/pwc-summary-1-30.json | 110 +- stats/pwc-summary-121-150.json | 128 +- stats/pwc-summary-151-180.json | 40 +- stats/pwc-summary-181-210.json | 34 +- stats/pwc-summary-211-240.json | 34 +- stats/pwc-summary-241-270.json | 34 +- stats/pwc-summary-271-300.json | 24 +- stats/pwc-summary-31-60.json | 116 +- stats/pwc-summary-61-90.json | 116 +- stats/pwc-summary-91-120.json | 124 +- stats/pwc-summary.json | 682 +++--- 38 files changed, 4391 insertions(+), 3352 deletions(-) create mode 100755 challenge-225/eric-cheung/python/ch-1.py create mode 100755 challenge-225/eric-cheung/python/ch-2.py create mode 100644 challenge-225/laurent-rosenfeld/blog.txt create mode 100644 challenge-225/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-225/laurent-rosenfeld/raku/ch-1.raku create mode 100644 challenge-225/robert-dicicco/julia/ch-1.jl create mode 100644 challenge-225/robert-dicicco/perl/ch-1.pl create mode 100644 challenge-225/robert-dicicco/python/ch-1.py create mode 100644 challenge-225/robert-dicicco/raku/ch-1.raku create mode 100644 challenge-225/robert-dicicco/ruby/ch-1.rb create mode 100644 challenge-225/ulrich-rieke/cpp/ch-1.cpp create mode 100644 challenge-225/ulrich-rieke/cpp/ch-2.cpp create mode 100644 challenge-225/ulrich-rieke/haskell/ch-1.hs create mode 100644 challenge-225/ulrich-rieke/haskell/ch-2.hs create mode 100644 challenge-225/ulrich-rieke/perl/ch-1.pl create mode 100644 challenge-225/ulrich-rieke/perl/ch-2.pl create mode 100644 challenge-225/ulrich-rieke/raku/ch-1.raku create mode 100644 challenge-225/ulrich-rieke/raku/ch-2.raku create mode 100644 challenge-225/ulrich-rieke/rust/ch-1.rs create mode 100644 challenge-225/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-224.json diff --git a/challenge-225/eric-cheung/python/ch-1.py b/challenge-225/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..f0095f08e1 --- /dev/null +++ b/challenge-225/eric-cheung/python/ch-1.py @@ -0,0 +1,8 @@ + +## arrWordList = ["Perl and Raku belong to the same family.", "I love Perl.", "The Perl and Raku Conference."] ## Example 1 +arrWordList = ["The Weekly Challenge.", "Python is the most popular guest language.", "Team PWC has over 300 members."] ## Example 2 + +arrWordLen = [len(wordLoop.split()) for wordLoop in arrWordList] +nMaxWordLen = max(arrWordLen) + +print (nMaxWordLen) diff --git a/challenge-225/eric-cheung/python/ch-2.py b/challenge-225/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..64e98389f4 --- /dev/null +++ b/challenge-225/eric-cheung/python/ch-2.py @@ -0,0 +1,19 @@ + +## arrInt = [10, 4, 8, 3] ## Example 1 +## arrInt = [1] ## Example 2 +arrInt = [1, 2, 3, 4, 5] ## Example 3 + +arrLeft = [0] +arrRight = [0] + +for nIndx in range(len(arrInt) - 1): + arrLeft.append(arrLeft[-1] + arrInt[nIndx]) + arrRight.append(arrRight[-1] + arrInt[len(arrInt) - nIndx - 1]) + +arrRight.reverse() + +arrLeftRightSumDiff = [abs(arrLeft[nIndx] - arrRight[nIndx]) for nIndx in range(len(arrLeft))] + +## print (arrLeft) +## print (arrRight) +print (arrLeftRightSumDiff) diff --git a/challenge-225/laurent-rosenfeld/blog.txt b/challenge-225/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..81e5655f24 --- /dev/null +++ b/challenge-225/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/07/perl-weekly-challenge-225-max-words.html diff --git a/challenge-225/laurent-rosenfeld/perl/ch-1.pl b/challenge-225/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..fa083ef410 --- /dev/null +++ b/challenge-225/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,25 @@ +use strict; +use warnings; +use feature 'say'; + +sub max_words { + my $max = 0; + for my $sentence (@_) { + my $cw = scalar split /\s+/, $sentence; + $max = $cw if $cw > $max; + } + return $max; +} + +my @tests = ( + ["The quick brown fox jumps over the lazy dog", + "Lorem ipsum dolor sit amet"], + ["Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."], + ["The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."]); +for my $test (@tests) { + say max_words @$test; +} diff --git a/challenge-225/laurent-rosenfeld/raku/ch-1.raku b/challenge-225/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..fa6cf6a104 --- /dev/null +++ b/challenge-225/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,21 @@ +sub max-words (@sentences) { + my $max = 0; + for @sentences -> $sentence { + my $cw = $sentence.words.elems; + $max = $cw if $cw > $max; + } + return $max; +} + +my @tests = + ("The quick brown fox jumps over the lazy dog", + "Lorem ipsum dolor sit amet"), + ("Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."), + ("The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."); +for @tests -> @test { + say max-words @test; +} diff --git a/challenge-225/robert-dicicco/julia/ch-1.jl b/challenge-225/robert-dicicco/julia/ch-1.jl new file mode 100644 index 0000000000..806b68291f --- /dev/null +++ b/challenge-225/robert-dicicco/julia/ch-1.jl @@ -0,0 +1,51 @@ +#!/usr/bin/env julia +#= +----------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-10 +Challenge 225 Task 1 Max Words ( Julia ) +----------------------------------- +=# + +using Printf + +lists = [["Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."], + ["The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."]] + +max_num = 0 + +for lst in lists + global max_num + @printf("Input: @list = %s\n",lst) + cnt = 1 + sz = length(lst) + while cnt < sz + words = split(lst[cnt]) + ln = length(words) + if ln > max_num + max_num = ln + end + cnt += 1 + end + @printf("Output: %d\n\n", max_num) + max_num = 0 +end + +#= +----------------------------------- +SAMPLE OUTPUT +julia .\MaxWords.jl +Input: @list = ["Perl and Raku belong to the same family.", "I love Perl.", "The Perl and Raku Conference."] +Output: 8 + +Input: @list = ["The Weekly Challenge.", "Python is the most popular guest language.", "Team PWC has over 300 members."] +Output: 7 +----------------------------------- +=# + + + diff --git a/challenge-225/robert-dicicco/perl/ch-1.pl b/challenge-225/robert-dicicco/perl/ch-1.pl new file mode 100644 index 0000000000..a5e7a2020d --- /dev/null +++ b/challenge-225/robert-dicicco/perl/ch-1.pl @@ -0,0 +1,55 @@ +#!/usr/bin/env perl +=begin comment +------------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-10 +Challenge 225 Task 1 Max Words ( Perl ) +------------------------------------------- +=cut +use strict; +use warnings; +use feature 'say'; + +my @lists = (["Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."], + ["The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."]); + +my $max_num = 0; +my $num = 0; + +sub count_words { + my $num; + my $lst = shift; + $num++ while $lst =~ /\S+/g; + return $num; +} + +for my $lst (@lists) { + say "Input: \@list = (",@$lst,")"; + for my $wds (@$lst) { + $num = count_words($wds); + if ($num > $max_num) { + $max_num = $num; + } + } + say "Output: $max_num\n"; + $max_num = 0; + $num = 0; +} + +=begin comment +------------------------------------------- +SAMPLE OUTPUT +perl .\MaxWords.pl +Input: @list = (Perl and Raku belong to the same family.I love Perl.The Perl and Raku Conference.) +Output: 8 + +Input: @list = (The Weekly Challenge.Python is the most popular guest language.Team PWC has over 300 members.) +Output: 7 +------------------------------------------- +=cut + + diff --git a/challenge-225/robert-dicicco/python/ch-1.py b/challenge-225/robert-dicicco/python/ch-1.py new file mode 100644 index 0000000000..a5822d23ef --- /dev/null +++ b/challenge-225/robert-dicicco/python/ch-1.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# ----------------------------------- +# AUTHOR: Robert DiCicco +# DATE : 2023-07-10 +# Challenge 225 Task 1 Max Words ( Python ) +# ----------------------------------- +lists = [["Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."], + ["The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."]] + +max_num = 0 +for lst in lists: + print("Input: @list = ",lst) + cnt = 0 + sz = len(lst) + while cnt < sz: + words = lst[cnt].split() + num = len(words) + if num > max_num: + max_num = num + cnt += 1 + print(f"Output: {max_num}\n") + max_num = 0 + +#----------------------------------- +# SAMPLE OUTPUT +# python .\MaxWords.py + +# Input: @list = ['Perl and Raku belong to the same family.', 'I love Perl.', 'The Perl and Raku Conference.'] +# Output: 8 + +# Input: @list = ['The Weekly Challenge.', 'Python is the most popular guest language.', 'Team PWC has over 300 members.'] +# Output: 7 +#----------------------------------- + + diff --git a/challenge-225/robert-dicicco/raku/ch-1.raku b/challenge-225/robert-dicicco/raku/ch-1.raku new file mode 100644 index 0000000000..e5b84bfcff --- /dev/null +++ b/challenge-225/robert-dicicco/raku/ch-1.raku @@ -0,0 +1,47 @@ +#!/usr/bin/env raku +=begin comment +----------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-10 +Challenge 225 Task 1 Max Words ( Raku ) +----------------------------------- +=end comment +use v6; + +my @lists = [["Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."], + ["The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."]]; + +my $max_num = 0; +my $num = 0; + +for (@lists) -> $lst { + say "Input: \@list = ($lst)"; + my $cnt = 0; + while $cnt < $lst.elems { + $num = $lst[$cnt].comb(/\w+/).elems; + if $num > $max_num { + $max_num = $num; + } + $cnt++; + } + say "Output: $max_num\n"; + $max_num = 0; + $num = 0; +} + +=begin comment +----------------------------------- +raku MaxWords.rk +Input: @list = (Perl and Raku belong to the same family. I love Perl. The Perl and Raku Conference.) +Output: 8 + +Input: @list = (The Weekly Challenge. Python is the most popular guest language. Team PWC has over 300 members.) +Output: 7 +----------------------------------- +=end comment + + diff --git a/challenge-225/robert-dicicco/ruby/ch-1.rb b/challenge-225/robert-dicicco/ruby/ch-1.rb new file mode 100644 index 0000000000..6b60ffc6aa --- /dev/null +++ b/challenge-225/robert-dicicco/ruby/ch-1.rb @@ -0,0 +1,44 @@ +#!/usr/bin/env ruby +=begin +----------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-10 +Challenge 225 Task 1 Max Words ( Ruby ) +----------------------------------- +=end + +lists = [["Perl and Raku belong to the same family.", + "I love Perl.", + "The Perl and Raku Conference."], + ["The Weekly Challenge.", + "Python is the most popular guest language.", + "Team PWC has over 300 members."]] + +max_num = 0 + +lists.each do |lst| + puts("Input: @list = #{lst}") + cnt = 0 + while cnt < lst.length + sz = lst[cnt].split.to_a; + if sz.length > max_num + max_num = sz.length + end + cnt += 1 + end + puts("Output: #{max_num}\n\n") + max_num = 0 +end + +=begin +----------------------------------- +ruby .\MaxWords.rb +Input: @list = ["Perl and Raku belong to the same family.", "I love Perl.", "The Perl and Raku Conference."] +Output: 8 + +Input: @list = ["The Weekly Challenge.", "Python is the most popular guest language.", "Team PWC has over 300 members."] +Output: 7 +----------------------------------- +=end + + diff --git a/challenge-225/ulrich-rieke/cpp/ch-1.cpp b/challenge-225/ulrich-rieke/cpp/ch-1.cpp new file mode 100644 index 0000000000..46258d8f48 --- /dev/null +++ b/challenge-225/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,42 @@ +#include +#include +#include +#include + +std::vector split( const std::string & startline , + const std::string & sep ) { + std::vector separated ; + std::string::size_type start { 0 } ; + std::string::size_type pos ; + do { + pos = startline.find_first_of( sep , start ) ; + separated.push_back( startline.substr(start , pos - start )) ; + start = pos + 1 ; + } while ( pos != std::string::npos ) ; + return separated ; +} + +int main( ) { + std::cout << "Enter some sentences, enter fin to end!\n" ; + std::vector sentences ; + std::string line ; + std::getline( std::cin , line ) ; + while ( line != "fin" ) { + if (line.substr(0 , 1 ) == " " || line.back( ) == ' ' ) { + std::cout << "There should be no spaces at the beginning and the end!\n" ; + std::cout << "Re-enter!\n" ; + } + else { + sentences.push_back( line ) ; + } + std::getline( std::cin , line ) ; + } + std::vector lengths ; + for ( auto s : sentences ) { + std::vector words ( split( s , " " ) ) ; + lengths.push_back( words.size( ) ) ; + } + std::cout << *std::max_element( lengths.begin( ) , lengths.end( ) ) << + std::endl ; + return 0 ; +} diff --git a/challenge-225/ulrich-rieke/cpp/ch-2.cpp b/challenge-225/ulrich-rieke/cpp/ch-2.cpp new file mode 100644 index 0000000000..6db2f84360 --- /dev/null +++ b/challenge-225/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,78 @@ +#include +#include +#include + +std::vector split( const std::string & startline , + const std::string & sep ) { + std::vector separated ; + std::string::size_type start { 0 } ; + std::string::size_type pos ; + do { + pos = startline.find_first_of( sep , start ) ; + separated.push_back( startline.substr(start , pos - start )) ; + start = pos + 1 ; + } while ( pos != std::string::npos ) ; + return separated ; +} + +std::vector find_left_array( const std::vector & numbers ) { + int len = numbers.size( ) ; + int limit = len / 2 ; + std::vector left_array ; + left_array.push_back( 0 ) ; + int left_sum = 0 ; + for ( int i = 0 ; i < limit + 1 ; i++ ) { + left_sum += numbers[ i ] ; + left_array.push_back( left_sum ) ; + } + return left_array ; +} + +std::vector find_right_array( const std::vector & numbers ) { + int len = numbers.size( ) ; + int left_limit = 0 ; + if ( len % 2 == 1 ) + left_limit = len / 2 ; + else + left_limit = len / 2 - 1 ; + std::vector right_array ; + int right_sum = 0 ; + for ( int i = left_limit ; i < len ; i++ ) + right_sum += numbers[ i ] ; + right_array.push_back( right_sum ) ; + for ( int i = left_limit ; i < len ; i++ ) { + right_sum -= numbers[ i ] ; + right_array.push_back( right_sum ) ; + } + right_array.push_back( 0 ) ; + return right_array ; +} + +int main( ) { + std::cout << "Enter some integers, separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector numberstrings( split( line , " " ) ) ; + std::vector numbers ; + for ( auto s : numberstrings ) + numbers.push_back( std::stoi( s ) ) ; + if (numbers.size( ) == 1) + std::cout << "(0)\n" ; + else { + std::vector result ; + std::vector left_array( find_left_array( numbers )) ; + std::vector right_array( find_right_array( numbers )) ; + for ( int i = 0 ; i < left_array.size( ) ; i++ ) { + result.push_back( std::abs( left_array[ i ] - right_array[ i ] )) ; + } + std::cout << "(" ; + for ( int i : result ) { + std::cout << i ; + if ( i != result.back( ) ) + std::cout << "," ; + else + std::cout << ")\n" ; + } + } + return 0 ; +} diff --git a/challenge-225/ulrich-rieke/haskell/ch-1.hs b/challenge-225/ulrich-rieke/haskell/ch-1.hs new file mode 100644 index 0000000000..adcbf6939e --- /dev/null +++ b/challenge-225/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,32 @@ +module Challenge225 + where +import Data.Char( isSpace ) +import Control.Monad.State + +isValid :: String -> Bool +isValid str = (not $ isSpace $ head str) && ( not $ isSpace $ last str ) + +askForInput :: IO String +askForInput = do + putStrLn "Enter a sentence without trailing spaces, fin to end!" + line <- getLine + if (isValid line ) then pure line + else + askForInput + +enterStrings :: StateT [String] ( IO )[String] +enterStrings = do + sentences <- get + sentence <- lift $ askForInput + if sentence == "fin" then return sentences + else do + modify (++ [sentence]) + enterStrings + +solution :: [String] -> Int +solution strings = maximum $ map ( length . words ) strings + +main :: IO ( ) +main = do + strings <- execStateT enterStrings [] + print $ solution strings diff --git a/challenge-225/ulrich-rieke/haskell/ch-2.hs b/challenge-225/ulrich-rieke/haskell/ch-2.hs new file mode 100644 index 0000000000..0eb711011e --- /dev/null +++ b/challenge-225/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,33 @@ +module Challenge225_2 + where + +find_left_array :: [Int] -> [Int] +find_left_array list = [0] ++ map (\i -> sum $ take i list ) [1..limit + 1] +where + limit :: Int + limit = div ( length list ) 2 + +find_right_array :: [Int] -> [Int] +find_right_array list = map (\i -> sum $ drop i rightPart ) [0..length +rightPart - 1] ++ [0] +where + l :: Int + l = length list + left_limit :: Int + left_limit = if odd l then div l 2 else div l 2 - 1 + rightPart :: [Int] + rightPart = drop left_limit list + +solution :: [Int] -> [Int] +solution list + |length list == 1 = [0] + |otherwise = zipWith op (find_left_array list) ( find_right_array list ) + where + op :: Int -> Int -> Int + op a b = abs( a - b ) + +main :: IO ( ) +main = do + putStrLn "Enter some digits, separated by blanks!" ; + numberstrings <- getLine + print $ solution $ map read $ words numberstrings diff --git a/challenge-225/ulrich-rieke/perl/ch-1.pl b/challenge-225/ulrich-rieke/perl/ch-1.pl new file mode 100644 index 0000000000..062ee4e50e --- /dev/null +++ b/challenge-225/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( max ) ; + +say "Please enter some sentences, fin to end entry!" ; +my @sentences ; +my $line = ; +chomp $line ; +while ( $line ne "fin" ) { + if ( $line !~ /^\S.+\S$/ ) { + say "There should be no trailing spaces at the beginning and the end!" ; + say "Re-enter!" ; + } + else { + push @sentences, $line ; + } + $line = ; + chomp $line ; +} +my @lengths ; +for my $sentence ( @sentences ) { + my @words = split( /\s/ , $sentence ) ; + push @lengths, scalar( @words ) ; +} +say max( @lengths ) ; diff --git a/challenge-225/ulrich-rieke/perl/ch-2.pl b/challenge-225/ulrich-rieke/perl/ch-2.pl new file mode 100644 index 0000000000..3ae0077215 --- /dev/null +++ b/challenge-225/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,60 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +sub find_left_array { + my $array = shift ; + my @left_array ; + my $len = scalar( @$array ) ; + my $limit = int( $len / 2 ) ; + push @left_array , 0 ; + my $left_sum = 0 ; + for my $i ( 0..$limit ) { + $left_sum += $array->[ $i ] ; + push @left_array, $left_sum ; + } + return @left_array ; +} + +sub find_right_array { + my $array = shift ; + my @right_array ; + my $len = scalar( @$array ) ; + my $left_limit ; + if ( $len % 2 == 1 ) { + $left_limit = int( $len / 2 ) ; + } + else { + $left_limit = int( $len / 2 ) - 1 ; + } + my $right_sum = 0 ; + for my $i( $left_limit..$len - 1 ) { + $right_sum += $array->[ $i ] ; + } + push @right_array , $right_sum ; + for my $i( $left_limit..$len - 1 ) { + $right_sum -= $array->[ $i ] ; + push @right_array , $right_sum ; + } + push @right_array , 0 ; + return @right_array ; +} + +say "Enter some integers, separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my $len = scalar( @numbers ) ; +if ( $len == 1 ) { + say "(0)" ; +} +else { + my @result ; + my @left_array = find_left_array( \@numbers ) ; + my @right_array = find_right_array( \@numbers ) ; + for my $i (0..scalar( @left_array) - 1 ) { + push @result , abs( $left_array[ $i ] - $right_array[ $i ] ) ; + } + say "(" . join( ',' , @result ) . ")" ; +} diff --git a/challenge-225/ulrich-rieke/raku/ch-1.raku b/challenge-225/ulrich-rieke/raku/ch-1.raku new file mode 100644 index 0000000000..a72a3486eb --- /dev/null +++ b/challenge-225/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,15 @@ +use v6 ; + +say "Enter some sentences! Enter fin to end!" ; +my @sentences ; +my $line = $*IN.get ; +while ( $line ne "fin" ) { + if ( $line ~~ /^\S .+ \S$/ ) { + @sentences.push( $line ) ; + } + else { + say "No leading or trailing spaces, please! Re-enter!" ; + } + $line = $*IN.get ; +} +say @sentences.map( {.words} ).map( {.elems} ).max ; diff --git a/challenge-225/ulrich-rieke/raku/ch-2.raku b/challenge-225/ulrich-rieke/raku/ch-2.raku new file mode 100644 index 0000000000..e8a3035feb --- /dev/null +++ b/challenge-225/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,56 @@ +use v6 ; + +sub find_left_array( @array ) { + my @left_array ; + my $len = @array.elems ; + my $limit = $len div 2 ; + @left_array.push( 0 ) ; + my $left_sum = 0 ; + for (0..$limit) -> $i { + $left_sum += @array[ $i ] ; + @left_array.push( $left_sum ) ; + } + return @left_array ; +} + +sub find_right_array( @array ) { + my @right_array ; + my $len = @array.elems ; + my $left_limit ; + if ( $len % 2 == 1 ) { + $left_limit = $len div 2 ; + } + else { + $left_limit = ( $len div 2 ) - 1 ; + } + my $right_sum = 0 ; + for ($left_limit..$len - 1) -> $i { + $right_sum += @array[ $i ] ; + } + @right_array.push( $right_sum ) ; + for ($left_limit..$len - 1 ) -> $i { + $right_sum -= @array[ $i ] ; + @right_array.push( $right_sum ) ; + } + @right_array.push( 0 ) ; + return @right_array ; +} + +sub my_op( $num1 , $num2 ) { + return abs( $num1 - $num2 ) ; +} + +say "Find some integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int } ) ; +my $len = @numbers.elems ; +if ( $len == 1 ) { + say "(0)" ; +} +else { + my @result ; + my @left_array = find_left_array( @numbers ) ; + my @right_array = find_right_array( @numbers ) ; + say "(" ~ join( "," , zip( @left_array, @right_array , :with( &my_op ) )) + ~ ")" ; +} diff --git a/challenge-225/ulrich-rieke/rust/ch-1.rs b/challenge-225/ulrich-rieke/rust/ch-1.rs new file mode 100644 index 0000000000..77707664ed --- /dev/null +++ b/challenge-225/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,26 @@ +use std::io ; +use std::io::BufRead ; + +fn main() -> io::Result<( )> { + println!("Enter some sentences, to end!"); + let mut lines = io::stdin( ).lock( ).lines( ) ; + let mut all_input : String = String::new( ) ; + while let Some( line ) = lines.next( ) { + let last_input = line.unwrap( ) ; + if last_input.len( ) == 0 { + break ; + } + else { + all_input.push_str("\n" ) ; + } + all_input.push_str( &last_input ) ; + } + let all_lines : Vec<&str> = all_input.split("\n").collect( ) ; + let mut lengths : Vec = Vec::new( ) ; + for sentence in all_lines { + let words = sentence.split_whitespace( ).count( ) ; + lengths.push( words ) ; + } + println!("{}" , lengths.iter( ).max( ).unwrap( ) ) ; + Ok(()) +} diff --git a/challenge-225/ulrich-rieke/rust/ch-2.rs b/challenge-225/ulrich-rieke/rust/ch-2.rs new file mode 100644 index 0000000000..2dc9fe7cd5 --- /dev/null +++ b/challenge-225/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,58 @@ +use std::io ; + +fn find_left_array( numbers : &Vec ) -> Vec { + let len : usize = numbers.len( ) ; + let limit : usize = len / 2 ; + let mut left_array : Vec = Vec::new( ) ; + left_array.push( 0 ) ; + let mut left_sum : i32 = 0 ; + for i in 0..=limit { + left_sum += numbers[ i ] ; + left_array.push( left_sum ) ; + } + left_array +} + +fn find_right_array( numbers : &Vec ) -> Vec { + let len : usize = numbers.len( ) ; + let left_limit : usize ; + if len % 2 == 1 { + left_limit = len / 2 ; + } + else { + left_limit = len / 2 - 1 ; + } + let mut right_array : Vec = Vec::new( ) ; + let mut right_sum : i32 = 0 ; + for i in left_limit..len { + right_sum += numbers[ i ] ; + } + right_array.push( right_sum ) ; + for i in left_limit..len { + right_sum -= numbers[ i ] ; + right_array.push( right_sum ) ; + } + right_array.push( 0 ) ; + right_array +} + +fn main() { + println!("Enter some integers , separated by a blank!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let numbers : Vec = entered_line.split_whitespace( ).map( | s | + s.trim( ).parse::( ).unwrap( )).collect( ) ; + if numbers.len( ) == 1 { + println!( "(0)" ) ; + } + else { + let mut result : Vec = Vec::new( ) ; + let left_array : Vec = find_left_array( &numbers ) ; + let right_array : Vec = find_right_array( &numbers ) ; + left_array.iter( ).zip( right_array.iter( )).for_each( | x | + result.push((x.0 - x.1).abs( ))) ; + println!("{:?}" , result ) ; + } +} + diff --git a/stats/pwc-challenge-165.json b/stats/pwc-challenge-165.json index 337ff78617..5aaa3a8c02 100644 --- a/stats/pwc-challenge-165.json +++ b/stats/pwc-challenge-165.json @@ -1,24 +1,178 @@ { - "subtitle" : { - "text" : "[Champions: 26] Last updated at 2023-04-03 00:46:09 GMT" + "title" : { + "text" : "The Weekly Challenge - 165" }, - "xAxis" : { - "type" : "category" + "legend" : { + "enabled" : 0 }, "chart" : { "type" : "column" }, "tooltip" : { - "headerFormat" : "{series.name}
", "followPointer" : 1, + "headerFormat" : "{series.name}
", "pointFormat" : "{point.name}: {point.y:f}
" }, - "legend" : { - "enabled" : 0 + "subtitle" : { + "text" : "[Champions: 27] Last updated at 2023-07-11 08:46:12 GMT" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } }, + "series" : [ + { + "name" : "The Weekly Challenge - 165", + "data" : [ + { + "drilldown" : "Adam Russell", + "name" : "Adam Russell", + "y" : 4 + }, + { + "drilldown" : "Arne Sommer", + "y" : 3, + "name" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 2, + "drilldown" : "Athanasius" + }, + { + "y" : 3, + "name" : "Cheok-Yin Fung", + "drilldown" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Colin Crain", + "name" : "Colin Crain", + "y" : 2 + }, + { + "y" : 3, + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby" + }, + { + "y" : 2, + "name" : "Duncan C. White", + "drilldown" : "Duncan C. White" + }, + { + "y" : 2, + "name" : "E. Choroba", + "drilldown" : "E. Choroba" + }, + { + "name" : "Flavio Poletti", + "y" : 6, + "drilldown" : "Flavio Poletti" + }, + { + "drilldown" : "James Smith", + "y" : 3, + "name" : "James Smith" + }, + { + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek", + "y" : 2 + }, + { + "drilldown" : "Jorg Sommrey", + "y" : 2, + "name" : "Jorg Sommrey" + }, + { + "drilldown" : "Julien Fiegehenn", + "y" : 2, + "name" : "Julien Fiegehenn" + }, + { + "name" : "Laurent Rosenfeld", + "y" : 6, + "drilldown" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "y" : 2, + "drilldown" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "y" : 8, + "drilldown" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson", + "y" : 2 + }, + { + "drilldown" : "Paulo Custodio", + "name" : "Paulo Custodio", + "y" : 2 + }, + { + "name" : "Peter Campbell Smith", + "y" : 3, + "drilldown" : "Peter Campbell Smith" + }, + { + "y" : 2, + "name" : "Rick Bychowski", + "drilldown" : "Rick Bychowski" + }, + { + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "y" : 2 + }, + { + "name" : "Roger Bell_West", + "y" : 5, + "drilldown" : "Roger Bell_West" + }, + { + "drilldown" : "Ryan Thompson", + "y" : 3, + "name" : "Ryan Thompson" + }, + { + "drilldown" : "Saif Ahmed", + "y" : 2, + "name" : "Saif Ahmed" + }, + { + "drilldown" : "Ulrich Rieke", + "y" : 2, + "name" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + }, + { + "name" : "Wanderdoc", + "y" : 2, + "drilldown" : "Wanderdoc" + } + ], + "colorByPoint" : 1 + } + ], "drilldown" : { "series" : [ { + "id" : "Adam Russell", + "name" : "Adam Russell", "data" : [ [ "Perl", @@ -28,9 +182,7 @@ "Blog", 2 ] - ], - "id" : "Adam Russell", - "name" : "Adam Russell" + ] }, { "data" : [ @@ -47,18 +199,17 @@ "id" : "Arne Sommer" }, { + "name" : "Athanasius", "data" : [ [ "Perl", 2 ] ], - "id" : "Athanasius", - "name" : "Athanasius" + "id" : "Athanasius" }, { "id" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", @@ -68,21 +219,21 @@ "Blog", 1 ] - ] + ], + "name" : "Cheok-Yin Fung" }, { - "name" : "Colin Crain", - "id" : "Colin Crain", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Colin Crain", + "id" : "Colin Crain" }, { "name" : "Dave Jacoby", - "id" : "Dave Jacoby", "data" : [ [ "Perl", @@ -92,16 +243,17 @@ "Blog", 1 ] - ] + ], + "id" : "Dave Jacoby" }, { + "name" : "Duncan C. White", "data" : [ [ "Perl", 2 ] ], - "name" : "Duncan C. White", "id" : "Duncan C. White" }, { @@ -115,8 +267,6 @@ ] }, { - "name" : "Flavio Poletti", - "id" : "Flavio Poletti", "data" : [ [ "Perl", @@ -130,7 +280,9 @@ "Blog", 2 ] - ] + ], + "name" : "Flavio Poletti", + "id" : "Flavio Poletti" }, { "id" : "James Smith", @@ -157,27 +309,26 @@ "id" : "Jan Krnavek" }, { - "id" : "Jorg Sommrey", - "name" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey" }, { - "id" : "Julien Fiegehenn", "name" : "Julien Fiegehenn", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Julien Fiegehenn" }, { - "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld", "data" : [ [ @@ -192,7 +343,18 @@ "Blog", 2 ] - ] + ], + "name" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Lubos Kolouch" }, { "data" : [ @@ -205,32 +367,30 @@ 6 ] ], - "id" : "Luca Ferrari", - "name" : "Luca Ferrari" + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" }, { + "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "id" : "Mark Anderson", - "name" : "Mark Anderson" + "id" : "Mark Anderson" }, { + "id" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] ], - "name" : "Paulo Custodio", - "id" : "Paulo Custodio" + "name" : "Paulo Custodio" }, { - "id" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -240,7 +400,9 @@ "Blog", 1 ] - ] + ], + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith" }, { "data" : [ @@ -249,22 +411,21 @@ 2 ] ], - "id" : "Rick Bychowski", - "name" : "Rick Bychowski" + "name" : "Rick Bychowski", + "id" : "Rick Bychowski" }, { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ], - "name" : "Robert Ransbottom", - "id" : "Robert Ransbottom" + ] }, { "name" : "Roger Bell_West", - "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -278,7 +439,8 @@ "Blog", 1 ] - ] + ], + "id" : "Roger Bell_West" }, { "data" : [ @@ -295,24 +457,24 @@ "id" : "Ryan Thompson" }, { + "id" : "Saif Ahmed", "data" : [ [ "Perl", 2 ] ], - "id" : "Saif Ahmed", "name" : "Saif Ahmed" }, { - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { "data" : [ @@ -340,159 +502,12 @@ } ] }, - "title" : { - "text" : "The Weekly Challenge - 165" + "xAxis" : { + "type" : "category" }, "yAxis" : { "title" : { "text" : "Total Solutions" } - }, - "series" : [ - { - "data" : [ - { - "name" : "Adam Russell", - "drilldown" : "Adam Russell", - "y" : 4 - }, - { - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer", - "y" : 3 - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 2 - }, - { - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung", - "y" : 3 - }, - { - "y" : 2, - "drilldown" : "Colin Crain", - "name" : "Colin Crain" - }, - { - "y" : 3, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "drilldown" : "Duncan C. White", - "name" : "Duncan C. White", - "y" : 2 - }, - { - "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 - }, - { - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti", - "y" : 6 - }, - { - "name" : "James Smith", - "drilldown" : "James Smith", - "y" : 3 - }, - { - "name" : "Jan Krnavek", - "drilldown" : "Jan Krnavek", - "y" : 2 - }, - { - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey", - "y" : 2 - }, - { - "name" : "Julien Fiegehenn", - "drilldown" : "Julien Fiegehenn", - "y" : 2 - }, - { - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld", - "y" : 6 - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 8 - }, - { - "y" : 2, - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson" - }, - { - "y" : 2, - "name" : "Paulo Custodio", - "drilldown" : "Paulo Custodio" - }, - { - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", - "y" : 3 - }, - { - "name" : "Rick Bychowski", - "drilldown" : "Rick Bychowski", - "y" : 2 - }, - { - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom", - "y" : 2 - }, - { - "y" : 5, - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West" - }, - { - "name" : "Ryan Thompson", - "drilldown" : "Ryan Thompson", - "y" : 3 - }, - { - "y" : 2, - "drilldown" : "Saif Ahmed", - "name" : "Saif Ahmed" - }, - { - "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 2 - }, - { - "y" : 3, - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan" - }, - { - "name" : "Wanderdoc", - "drilldown" : "Wanderdoc", - "y" : 2 - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 165" - } - ], - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } } } diff --git a/stats/pwc-challenge-166.json b/stats/pwc-challenge-166.json index cbea3da470..467bebfa16 100644 --- a/stats/pwc-challenge-166.json +++ b/stats/pwc-challenge-166.json @@ -1,178 +1,34 @@ { - "tooltip" : { - "headerFormat" : "{series.name}
", - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
" - }, - "legend" : { - "enabled" : 0 - }, "subtitle" : { - "text" : "[Champions: 26] Last updated at 2023-04-03 00:46:09 GMT" + "text" : "[Champions: 27] Last updated at 2023-07-11 08:46:12 GMT" }, - "xAxis" : { - "type" : "category" - }, - "chart" : { - "type" : "column" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "series" : [ - { - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 166", - "data" : [ - { - "y" : 3, - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 4 - }, - { - "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung", - "y" : 2 - }, - { - "drilldown" : "Colin Crain", - "name" : "Colin Crain", - "y" : 2 - }, - { - "y" : 3, - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby" - }, - { - "name" : "Duncan C. White", - "drilldown" : "Duncan C. White", - "y" : 2 - }, - { - "drilldown" : "E. Choroba", - "name" : "E. Choroba", - "y" : 2 - }, - { - "y" : 7, - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti" - }, - { - "drilldown" : "James Smith", - "name" : "James Smith", - "y" : 3 - }, - { - "y" : 2, - "name" : "Jan Krnavek", - "drilldown" : "Jan Krnavek" - }, - { - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey", - "y" : 2 - }, - { - "y" : 3, - "drilldown" : "Julien Fiegehenn", - "name" : "Julien Fiegehenn" - }, - { - "drilldown" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld", - "y" : 5 - }, - { - "y" : 8, - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 - }, - { - "drilldown" : "Matthew Neleigh", - "name" : "Matthew Neleigh", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke" - }, - { - "y" : 2, - "name" : "Paulo Custodio", - "drilldown" : "Paulo Custodio" - }, - { - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", - "y" : 3 - }, - { - "name" : "Rick Bychowski", - "drilldown" : "Rick Bychowski", - "y" : 2 - }, - { - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom" - }, - { - "y" : 5, - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West" - }, - { - "y" : 4, - "drilldown" : "Ryan Thompson", - "name" : "Ryan Thompson" - }, - { - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke", - "y" : 2 - }, - { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 - } - ] - } - ], "plotOptions" : { "series" : { + "borderWidth" : 0, "dataLabels" : { "format" : "{point.y}", "enabled" : 1 - }, - "borderWidth" : 0 + } } }, + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : 0 + }, + "title" : { + "text" : "The Weekly Challenge - 166" + }, "drilldown" : { "series" : [ { "id" : "Arne Sommer", - "name" : "Arne Sommer", "data" : [ [ "Raku", @@ -182,9 +38,12 @@ "Blog", 1 ] - ] + ], + "name" : "Arne Sommer" }, { + "id" : "Athanasius", + "name" : "Athanasius", "data" : [ [ "Perl", @@ -194,32 +53,29 @@ "Raku", 2 ] - ], - "name" : "Athanasius", - "id" : "Athanasius" + ] }, { - "name" : "Cheok-Yin Fung", "id" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Cheok-Yin Fung" }, { - "name" : "Colin Crain", - "id" : "Colin Crain", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Colin Crain", + "id" : "Colin Crain" }, { - "name" : "Dave Jacoby", "id" : "Dave Jacoby", "data" : [ [ @@ -230,17 +86,18 @@ "Blog", 1 ] - ] + ], + "name" : "Dave Jacoby" }, { + "id" : "Duncan C. White", + "name" : "Duncan C. White", "data" : [ [ "Perl", 2 ] - ], - "name" : "Duncan C. White", - "id" : "Duncan C. White" + ] }, { "id" : "E. Choroba", @@ -253,6 +110,7 @@ ] }, { + "id" : "Flavio Poletti", "data" : [ [ "Perl", @@ -267,12 +125,9 @@ 3 ] ], - "id" : "Flavio Poletti", "name" : "Flavio Poletti" }, { - "id" : "James Smith", - "name" : "James Smith", "data" : [ [ "Perl", @@ -282,21 +137,23 @@ "Blog", 1 ] - ] + ], + "name" : "James Smith", + "id" : "James Smith" }, { - "id" : "Jan Krnavek", "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Jan Krnavek" }, { - "name" : "Jorg Sommrey", "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", "data" : [ [ "Perl", @@ -305,6 +162,7 @@ ] }, { + "name" : "Julien Fiegehenn", "data" : [ [ "Perl", @@ -315,10 +173,11 @@ 1 ] ], - "id" : "Julien Fiegehenn", - "name" : "Julien Fiegehenn" + "id" : "Julien Fiegehenn" }, { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -332,11 +191,21 @@ "Blog", 1 ] - ], - "id" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld" + ] }, { + "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Luca Ferrari", + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -346,18 +215,16 @@ "Blog", 6 ] - ], - "id" : "Luca Ferrari", - "name" : "Luca Ferrari" + ] }, { + "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "id" : "Mark Anderson", "name" : "Mark Anderson" }, { @@ -367,30 +234,31 @@ 2 ] ], - "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh" + "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh" }, { + "id" : "Niels van Dijke", + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke", - "name" : "Niels van Dijke" + ] }, { + "id" : "Paulo Custodio", + "name" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] - ], - "id" : "Paulo Custodio", - "name" : "Paulo Custodio" + ] }, { + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -401,7 +269,6 @@ 1 ] ], - "name" : "Peter Campbell Smith", "id" : "Peter Campbell Smith" }, { @@ -415,6 +282,7 @@ ] }, { + "id" : "Robert DiCicco", "data" : [ [ "Perl", @@ -425,20 +293,20 @@ 1 ] ], - "name" : "Robert DiCicco", - "id" : "Robert DiCicco" + "name" : "Robert DiCicco" }, { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ], - "id" : "Robert Ransbottom", - "name" : "Robert Ransbottom" + ] }, { + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -453,11 +321,9 @@ 1 ] ], - "name" : "Roger Bell_West", - "id" : "Roger Bell_West" + "name" : "Roger Bell_West" }, { - "id" : "Ryan Thompson", "name" : "Ryan Thompson", "data" : [ [ @@ -468,7 +334,8 @@ "Blog", 2 ] - ] + ], + "id" : "Ryan Thompson" }, { "data" : [ @@ -481,12 +348,10 @@ 1 ] ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -496,11 +361,161 @@ "Blog", 1 ] - ] + ], + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan" } ] }, - "title" : { - "text" : "The Weekly Challenge - 166" + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 3 + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 4 + }, + { + "y" : 2, + "name" : "Cheok-Yin Fung", + "drilldown" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Colin Crain", + "name" : "Colin Crain", + "y" : 2 + }, + { + "drilldown" : "Dave Jacoby", + "y" : 3, + "name" : "Dave Jacoby" + }, + { + "drilldown" : "Duncan C. White", + "name" : "Duncan C. White", + "y" : 2 + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "drilldown" : "Flavio Poletti", + "y" : 7, + "name" : "Flavio Poletti" + }, + { + "name" : "James Smith", + "y" : 3, + "drilldown" : "James Smith" + }, + { + "y" : 2, + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "y" : 2, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "drilldown" : "Julien Fiegehenn", + "name" : "Julien Fiegehenn", + "y" : 3 + }, + { + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "y" : 5 + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 2, + "name" : "Lubos Kolouch" + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 8 + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke", + "y" : 2 + }, + { + "drilldown" : "Paulo Custodio", + "y" : 2, + "name" : "Paulo Custodio" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "drilldown" : "Rick Bychowski", + "y" : 2, + "name" : "Rick Bychowski" + }, + { + "drilldown" : "Robert DiCicco", + "y" : 2, + "name" : "Robert DiCicco" + }, + { + "y" : 2, + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom" + }, + { + "y" : 5, + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West" + }, + { + "drilldown" : "Ryan Thompson", + "y" : 4, + "name" : "Ryan Thompson" + }, + { + "y" : 2, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + } + ], + "name" : "The Weekly Challenge - 166" + } + ], + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" } } diff --git a/stats/pwc-challenge-224.json b/stats/pwc-challenge-224.json new file mode 100644 index 0000000000..0dbf5325f3 --- /dev/null +++ b/stats/pwc-challenge-224.json @@ -0,0 +1,518 @@ +{ + "drilldown" : { + "series" : [ + { + "id" : "Andreas Voegele", + "name" : "Andreas Voegele", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Andrew Shitov", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Andrew Shitov" + }, + { + "id" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Arne Sommer" + }, + { + "name" : "Avery Adams", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Avery Adams" + }, + { + "id" : "BarrOff", + "name" : "BarrOff", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ] + }, + { + "name" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 1 + ] + ], + "id" : "Cheok-Yin Fung" + }, + { + "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 1 + ] + ], + "name" : "David Ferrone" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" + }, + { + "id" : "Flavio Poletti", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", +