From a3d346ab5447bac837bb2086fdaea12bd8fbe495 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 31 Oct 2023 17:28:13 +0000 Subject: - Added solutions by E. Choroba. - Added solutions by Robbie Hatley. - Added solutions by rcmlz. - Added solutions by Mark Anderson. - Added solutions by Lubos Kolouch. - Added solutions by W. Luis Mochan. - Added solutions by David Ferrone. - Added solutions by Peter Campbell Smith. - Added solutions by Kjetil Skotheim. - Added solutions by Dave Jacoby. - Added solutions by Niels van Dijke. - Added solutions by Packy Anderson. - Added solutions by Luca Ferrari. - Added solutions by Thomas Kohler. - Added solutions by Ali Moradi. - Added solutions by Roger Bell_West. --- challenge-241/eric-cheung/python/ch-1.py | 28 + challenge-241/eric-cheung/python/ch-2.py | 40 + challenge-241/perlboy1967/perl/ch-1.pl | 46 + challenge-241/perlboy1967/perl/ch-2.pl | 50 + challenge-241/perlboy1967/perl/ch1.pl | 46 - challenge-241/perlboy1967/perl/ch2.pl | 50 - challenge-241/rcmlz/raku/ch-1.raku | 29 + challenge-241/rcmlz/raku/ch-2.raku | 18 + challenge-241/ulrich-rieke/cpp/ch-1.cpp | 44 + challenge-241/ulrich-rieke/cpp/ch-2.cpp | 63 + challenge-241/ulrich-rieke/haskell/ch-1.hs | 25 + challenge-241/ulrich-rieke/haskell/ch-2.hs | 32 + challenge-241/ulrich-rieke/perl/ch-1.pl | 24 + challenge-241/ulrich-rieke/perl/ch-2.pl | 35 + challenge-241/ulrich-rieke/raku/ch-1.raku | 17 + challenge-241/ulrich-rieke/raku/ch-2.raku | 41 + challenge-241/ulrich-rieke/rust/ch-1.rs | 30 + challenge-241/ulrich-rieke/rust/ch-2.rs | 46 + stats/pwc-challenge-240.json | 715 ++++++ stats/pwc-current.json | 631 ++---- stats/pwc-language-breakdown-summary.json | 56 +- stats/pwc-language-breakdown.json | 3363 ++++++++++++++-------------- stats/pwc-leaders.json | 504 ++--- stats/pwc-summary-1-30.json | 124 +- stats/pwc-summary-121-150.json | 96 +- stats/pwc-summary-151-180.json | 58 +- stats/pwc-summary-181-210.json | 122 +- stats/pwc-summary-211-240.json | 54 +- stats/pwc-summary-241-270.json | 46 +- stats/pwc-summary-271-300.json | 120 +- stats/pwc-summary-31-60.json | 42 +- stats/pwc-summary-61-90.json | 116 +- stats/pwc-summary-91-120.json | 106 +- stats/pwc-summary.json | 694 +++--- 34 files changed, 4192 insertions(+), 3319 deletions(-) create mode 100755 challenge-241/eric-cheung/python/ch-1.py create mode 100755 challenge-241/eric-cheung/python/ch-2.py create mode 100755 challenge-241/perlboy1967/perl/ch-1.pl create mode 100755 challenge-241/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-241/perlboy1967/perl/ch1.pl delete mode 100755 challenge-241/perlboy1967/perl/ch2.pl create mode 100644 challenge-241/rcmlz/raku/ch-1.raku create mode 100644 challenge-241/rcmlz/raku/ch-2.raku create mode 100755 challenge-241/ulrich-rieke/cpp/ch-1.cpp create mode 100755 challenge-241/ulrich-rieke/cpp/ch-2.cpp create mode 100755 challenge-241/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-241/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-241/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-241/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-241/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-241/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-241/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-241/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-240.json diff --git a/challenge-241/eric-cheung/python/ch-1.py b/challenge-241/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..6e19580d14 --- /dev/null +++ b/challenge-241/eric-cheung/python/ch-1.py @@ -0,0 +1,28 @@ + +from itertools import combinations + +def IsAriTriplet (arrInput, nDiffInput): + if arrInput[1] - arrInput[0] != nDiffInput: + return False + if arrInput[2] - arrInput[1] != nDiffInput: + return False + return True + + +## Example 1 +## arrNum = [0, 1, 4, 6, 7, 10] +## nDiff = 3 + +## Example 2 +arrNum = [4, 5, 6, 7, 8, 9] +nDiff = 2 + + +arrCombList = combinations(arrNum, 3) +arrOutputList = [] + +for arrLoop in list(arrCombList): + if IsAriTriplet(arrLoop, nDiff): + arrOutputList.append(arrOutputList) + +print (len(arrOutputList)) diff --git a/challenge-241/eric-cheung/python/ch-2.py b/challenge-241/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..a1eb778bf5 --- /dev/null +++ b/challenge-241/eric-cheung/python/ch-2.py @@ -0,0 +1,40 @@ + +from math import sqrt + +def GetPrimeFact(nInput): + if nInput < 2: + return [] + if nInput == 2: + return [2] + + ## ====== ## + nNum = nInput + arrOuput = [] + while nNum % 2 == 0: + arrOuput.append(2) + nNum = int(nNum / 2) + ## ====== ## + + ## ====== ## + nDiv = 3 + nRoot = int(sqrt(nNum)) + while nDiv < nRoot + 1: + if nNum % nDiv == 0: + arrOuput.append(nDiv) + nNum = int(nNum / nDiv) + else: + nDiv = nDiv + 2 + ## ====== ## + + return arrOuput + +arrInput = [11, 8, 27, 4] + +for nRowIndx in range(0, len(arrInput) - 1): + for nColIndx in range(nRowIndx + 1, len(arrInput)): + if len(GetPrimeFact(arrInput[nRowIndx])) > len(GetPrimeFact(arrInput[nColIndx])) or len(GetPrimeFact(arrInput[nRowIndx])) == len(GetPrimeFact(arrInput[nColIndx])) and arrInput[nRowIndx] > arrInput[nColIndx]: + nTemp = arrInput[nRowIndx] + arrInput[nRowIndx] = arrInput[nColIndx] + arrInput[nColIndx] = nTemp + +print (arrInput) diff --git a/challenge-241/perlboy1967/perl/ch-1.pl b/challenge-241/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..dacf68a262 --- /dev/null +++ b/challenge-241/perlboy1967/perl/ch-1.pl @@ -0,0 +1,46 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 241 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-241 + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Arithmetic Triplets +Submitted by: Mohammad S Anwar + +You are given an array (3 or more members) of integers in increasing order and a positive integer. + +Write a script to find out the number of unique Arithmetic Triplets satisfying the following rules: + +a) i < j < k +b) nums[j] - nums[i] == diff +c) nums[k] - nums[j] == diff + +=cut + +use v5.32; +use common::sense; + +use Test2::V0; + +sub nArithmeticTriplets (\@$) { + my ($arL,$diff) = @_; + my $n = 0; + + for my $i (0 .. $arL->$#* - 2) { + for my $j ($i + 1 .. $arL->$#* - 1) { + for my $k ($j + 1 .. $arL->$#*) { + $n++ if ($$arL[$j] - $$arL[$i] == $diff == $$arL[$k] - $$arL[$j]); + } + } + } + + return $n; +} + +is(nArithmeticTriplets(@{[0,1,4,6,7,10]},3), 2); +is(nArithmeticTriplets(@{[4,5,6,7,8,9]},2), 2); + +done_testing; diff --git a/challenge-241/perlboy1967/perl/ch-2.pl b/challenge-241/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..2d79bcd7ea --- /dev/null +++ b/challenge-241/perlboy1967/perl/ch-2.pl @@ -0,0 +1,50 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 241 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-241 + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Prime Order +Submitted by: Mohammad S Anwar + +You are given an array of unique positive integers greater than 2. + +Write a script to sort them in ascending order of the count of their prime factors, tie-breaking +by ascending value. + +=cut + +use v5.32; +use common::sense; + +use Math::Prime::Util qw(factor); + +use Test2::V0; + +sub _cmpLists (\@\@) { + my $r = 0; + + for (1 .. $_[0]->$#*) { + $r = $_[0]->[$_] <=> $_[1]->[$_]; + return $r if $r != 0; + } + + return 0; +} + +sub primeOrder (@) { + map { $_->[0] } sort { + scalar(@$a) <=> scalar(@$b) + || + _cmpLists(@{$a},@{$b}) + } map { [$_, factor($_)] } @_; + +} + +is([primeOrder(11,8,27,4)],[11,4,8,27]); +is([primeOrder(15,3,4,2,12)],[2,3,4,15,12]); + +done_testing; diff --git a/challenge-241/perlboy1967/perl/ch1.pl b/challenge-241/perlboy1967/perl/ch1.pl deleted file mode 100755 index dacf68a262..0000000000 --- a/challenge-241/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 241 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-241 - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Arithmetic Triplets -Submitted by: Mohammad S Anwar - -You are given an array (3 or more members) of integers in increasing order and a positive integer. - -Write a script to find out the number of unique Arithmetic Triplets satisfying the following rules: - -a) i < j < k -b) nums[j] - nums[i] == diff -c) nums[k] - nums[j] == diff - -=cut - -use v5.32; -use common::sense; - -use Test2::V0; - -sub nArithmeticTriplets (\@$) { - my ($arL,$diff) = @_; - my $n = 0; - - for my $i (0 .. $arL->$#* - 2) { - for my $j ($i + 1 .. $arL->$#* - 1) { - for my $k ($j + 1 .. $arL->$#*) { - $n++ if ($$arL[$j] - $$arL[$i] == $diff == $$arL[$k] - $$arL[$j]); - } - } - } - - return $n; -} - -is(nArithmeticTriplets(@{[0,1,4,6,7,10]},3), 2); -is(nArithmeticTriplets(@{[4,5,6,7,8,9]},2), 2); - -done_testing; diff --git a/challenge-241/perlboy1967/perl/ch2.pl b/challenge-241/perlboy1967/perl/ch2.pl deleted file mode 100755 index 2d79bcd7ea..0000000000 --- a/challenge-241/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 241 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-241 - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Prime Order -Submitted by: Mohammad S Anwar - -You are given an array of unique positive integers greater than 2. - -Write a script to sort them in ascending order of the count of their prime factors, tie-breaking -by ascending value. - -=cut - -use v5.32; -use common::sense; - -use Math::Prime::Util qw(factor); - -use Test2::V0; - -sub _cmpLists (\@\@) { - my $r = 0; - - for (1 .. $_[0]->$#*) { - $r = $_[0]->[$_] <=> $_[1]->[$_]; - return $r if $r != 0; - } - - return 0; -} - -sub primeOrder (@) { - map { $_->[0] } sort { - scalar(@$a) <=> scalar(@$b) - || - _cmpLists(@{$a},@{$b}) - } map { [$_, factor($_)] } @_; - -} - -is([primeOrder(11,8,27,4)],[11,4,8,27]); -is([primeOrder(15,3,4,2,12)],[2,3,4,15,12]); - -done_testing; diff --git a/challenge-241/rcmlz/raku/ch-1.raku b/challenge-241/rcmlz/raku/ch-1.raku new file mode 100644 index 0000000000..e3ed5a9147 --- /dev/null +++ b/challenge-241/rcmlz/raku/ch-1.raku @@ -0,0 +1,29 @@ +unit module rcmlz::raku::task-one:ver<0.0.1>:auth:api<1>; + +# run in terminal: raku --optimize=3 -I challenge-nr241/rcmlz/raku/ -- test/challenge-nr241/raku/task-one.rakutest +# or raku --optimize=3 -I challenge-nr241 -- test/benchmark-scalability.raku --task=task-one --user=rcmlz --max-run-times=1,3,7 --max-problem=10 --v=True --test-before-benchmark=True --out-folder=/tmp nr241; cat /tmp/nr241_task-one.csv + +#|[ +You are given an array (3 or more members) of integers in increasing order and a positive integer. + +Write a script to find out the number of unique Arithmetic Triplets satisfying the following rules: + +a) i < j < k +b) nums[j] - nums[i] == diff +c) nums[k] - nums[j] == diff +] +our sub solution([$diff, *@input]) is export { + my UInt $counter = 0; + my UInt \n = @input.elems; + + for ^n -> \i { + for i+1..^n -> \j { + if @input[j] - @input[i] == $diff { + for j+1..^n -> \k { + $counter++ if @input[k] - @input[j] == $diff + } + } + } + } + $counter +} \ No newline at end of file diff --git a/challenge-241/rcmlz/raku/ch-2.raku b/challenge-241/rcmlz/raku/ch-2.raku new file mode 100644 index 0000000000..f871118a42 --- /dev/null +++ b/challenge-241/rcmlz/raku/ch-2.raku @@ -0,0 +1,18 @@ +unit module rcmlz::raku::task-two:ver<0.0.1>:auth:api<1>; + +use Prime::Factor; + +# run in terminal: raku --optimize=3 -I challenge-nr241/rcmlz/raku/ -- test/challenge-nr241/raku/task-two.rakutest +# or raku --optimize=3 -I challenge-nr241 -- test/benchmark-scalability.raku --task=task-two --user=rcmlz --max-run-times=1,3,7 --max-problem=10 --v=True --test-before-benchmark=True --out-folder=/tmp nr241; cat /tmp/nr241_task-two.csv + +#|[ +You are given an array of unique positive integers greater than 2. + +- Write a script to sort them in ascending order of the count of their prime factors, tie-breaking by ascending value. +] +our sub solution(@input) is export { + @input ==> map( -> $n { $n => prime-factors($n).elems } ) + ==> sort( { my Order $o = $^a.value cmp $^b.value; + $o == Same ?? $^a.key cmp $^b.key !! $o } ) + ==> map( *.key ) +} \ No newline at end of file diff --git a/challenge-241/ulrich-rieke/cpp/ch-1.cpp b/challenge-241/ulrich-rieke/cpp/ch-1.cpp new file mode 100755 index 0000000000..c446abe90c --- /dev/null +++ b/challenge-241/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,44 @@ +#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 at least 3 positive integers in ascending order!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::cout << "Enter a positive integer!\n" ; + int diff ; + std::cin >> diff ; + std::vector numberstrings { split( line , " " ) } ; + std::vector numbers ; + for ( auto s : numberstrings ) + numbers.push_back( std::stoi( s ) ) ; + int result = 0 ; + int len = numbers.size( ) ; + for ( int i = 0 ; i < len - 2 ; i++ ) { + for ( int j = i + 1 ; j < len - 1 ; j++ ) { + for ( int k = j + 1 ; k < len ; k++ ) { + if ( numbers[ j ] - numbers[ i ] == diff + && numbers[ k ] - numbers[ j ] == diff ) + result++ ; + } + } + } + std::cout << result << std::endl ; + return 0 ; +} + diff --git a/challenge-241/ulrich-rieke/cpp/ch-2.cpp b/challenge-241/ulrich-rieke/cpp/ch-2.cpp new file mode 100755 index 0000000000..d83be4832a --- /dev/null +++ b/challenge-241/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,63 @@ +#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 findSmallest( int number ) { + int divisor = 2 ; + while ( number % divisor != 0 ) { + divisor++ ; + } + return divisor ; +} + +std::vector primeDecompose( int number ) { + std::vector primeFactors ; + while ( number != 1 ) { + int divisor = findSmallest( number ) ; + primeFactors.push_back( divisor ) ; + number /= divisor ; + } + return primeFactors ; +} + +bool mySorter( int numA , int numB ) { + std::vector factorsA { primeDecompose( numA ) } ; + std::vector factorsB { primeDecompose( numB ) } ; + if ( factorsA.size( ) != factorsB.size( ) ) { + return factorsA.size( ) < factorsB.size( ) ; + } + else { + return numA < numB ; + } +} + +int main( ) { + std::cout << "Enter some unique positive integers greater than 2!\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 ) ) ; + std::sort( numbers.begin( ) , numbers.end( ) , mySorter ) ; + std::cout << "( " ; + for ( int i : numbers ) + std::cout << i << ' ' ; + std::cout << " )\n" ; + return 0 ; +} + diff --git a/challenge-241/ulrich-rieke/haskell/ch-1.hs b/challenge-241/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..33cf551cf5 --- /dev/null +++ b/challenge-241/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,25 @@ +module Challenge241 + where +import Data.List ( (!!) ) + +combinations :: Int -> [a] -> [[a]] +combinations 0 _ = [[]] +combinations n xs = [ xs !! i : x | i <- [0..(length xs ) - 1 ] , + x <- combinations (n - 1 ) ( drop ( i + 1 ) xs ) ] + +myCondition :: [Int] -> [Int] -> Int -> Bool +myCondition indices list diff = ( (list !! ( indices !! 1 )) - + (list !! ( indices !! 0 )) == diff ) && ( ( list !! ( indices !! 2 )) - + ( list !! ( indices !! 1 ) ) == diff ) + +main :: IO ( ) +main = do + putStrLn "Enter at least 3 positive integers in ascending order!" + numberstrings <- getLine + putStrLn "Enter a positive integer!" + diffstring <- getLine + let numbers = map read $ words numberstrings + diff = read diffstring + allCombis = combinations 3 [0..length numbers - 1] + selected = filter (\li -> myCondition li numbers diff ) allCombis + print $ length selected diff --git a/challenge-241/ulrich-rieke/haskell/ch-2.hs b/challenge-241/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..1857b0125c --- /dev/null +++ b/challenge-241/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,32 @@ +module Challenge241_2 + where +import Data.List ( sortBy ) + +--for every number, find the smallest divisor which must, by +--definition of smallest and prime, be prime + +divisors :: Int -> [Int] +divisors n = [d | d <- [2..n] , mod n d == 0 ] + +primeDecompose :: Int -> [Int] +primeDecompose n = snd $ until ( ( == 1 ) . fst ) step ( n , [] ) + where + step :: ( Int , [Int] ) -> ( Int , [Int] ) + step ( num , list ) = ( div num smallest , smallest : list ) + where + smallest = head $ divisors num + +mySorter :: Int -> Int -> Ordering +mySorter a b + |la /= lb = compare la lb + |otherwise = compare a b + where + la = length $ primeDecompose a + lb = length $ primeDecompose b + +main :: IO ( ) +main = do + putStrLn "Please enter some unique positive integers greater than 2!" + numberstrings <- getLine + let numbers = map read $ words numberstrings + print $ sortBy mySorter numbers diff --git a/challenge-241/ulrich-rieke/perl/ch-1.pl b/challenge-241/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..152d0cf586 --- /dev/null +++ b/challenge-241/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use Algorithm::Combinatorics qw ( combinations ) ; + +say "Enter at least 3 integers in increasing order!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +say "Enter a positive number!" ; +my $diff = ; +chomp $diff ; +my $result = 0 ; +my @indices = (0..scalar( @numbers ) - 1) ; +my $iter = combinations( \@indices , 3 ) ; +while ( my $c = $iter->next ) { + if ( ($numbers[ $c->[1] ] - $numbers[ $c->[0] ] == $diff) + && ($numbers[ $c->[2] ] - $numbers[ $c->[1] ] == $diff ) ) { + $result++ ; + } +} +say $result ; + diff --git a/challenge-241/ulrich-rieke/perl/ch-2.pl b/challenge-241/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..9e8b25e703 --- /dev/null +++ b/challenge-241/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +#the smallest divisor always is a prime number. So we have to keep +#finding the smallest divisors. + +sub findSmallest { + my $number = shift ; + my $divisor = 2 ; + while ( $number % $divisor != 0 ) { + $divisor++ ; + } + return $divisor ; +} + +sub findPrimeFactors { + my $number = shift ; + my @primeFactors ; + while ( $number != 1 ) { + my $divisor = findSmallest( $number ) ; + push @primeFactors , $divisor ; + $number /= $divisor ; + } + return @primeFactors ; +} + +say "Enter some unique positive integers greater than 2" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my @sorted = sort { scalar( findPrimeFactors( $a ) ) <=> + scalar( findPrimeFactors( $b ) ) || $a <=> $b } @numbers ; +say "(" . join( ',' , @sorted ) . ")" ; diff --git a/challenge-241/ulrich-rieke/raku/ch-1.raku b/challenge-241/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..a7667fe135 --- /dev/null +++ b/challenge-241/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,17 @@ +use v6 ; + +say "Enter at least 3 integers in ascending order!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +say "Enter a positive integer!" ; +my $diff = $*IN.get ; +my @indices = (0..@numbers.elems - 1 ) ; +my $result = 0 ; +my @combis = @indices.combinations( 3 ) ; +for @combis -> $combi { + if ( @numbers[ $combi[ 1 ] ] - @numbers[ $combi[ 0 ] ] == $diff + && @numbers[ $combi[ 2 ] ] - @numbers[ $combi[ 1 ] ] == $diff ) { + $result++ ; + } +} +say $result ; diff --git a/challenge-241/ulrich-rieke/raku/ch-2.raku b/challenge-241/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..b6cb615c9a --- /dev/null +++ b/challenge-241/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,41 @@ +use v6 ; + +#the smallest divisor of a number must be a prime number! So all it takes +#is to keep finding the smallest divisor of a number until it equals 1 + +sub findSmallest( $number is copy ) { + my $divisor = 2 ; + while ( not ( $number %% $divisor ) ) { + $divisor++ ; + } + return $divisor ; +} + +sub prime_decompose( $number is copy ) { + my @primeFactors ; + while ( $number != 1 ) { + my $divisor = findSmallest( $number ) ; + @primeFactors.push( $divisor ) ; + $number div= $divisor ; + } + return @primeFactors ; +} + +sub mySorter( $firstNum is copy , $secondNum is copy ) { + my @factorsA = prime_decompose( $firstNum ) ; + my @factorsB = prime_decompose( $secondNum ) ; + my $lenA = @factorsA.elems ; + my $lenB = @factorsB.elems ; + if ( $lenA != $lenB ) { + return $lenA <=> $lenB ; + } + else { + return $firstNum <=> $secondNum ; + } +} + +say "Enter some unique positive integers greater than 2!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my @sorted = @numbers.sort( {&mySorter( $^a , $^b ) } ) ; +say "(" ~ @sorted.join( ',' ) ~ ")" ; diff --git a/challenge-241/ulrich-rieke/rust/ch-1.rs b/challenge-241/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..6fe364f226 --- /dev/null +++ b/challenge-241/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,30 @@ +use std::io ; +use itertools::Itertools ; + +fn main() { + println!("Enter at least 3 integers in increasing order!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + println!("Enter a positive integer!" ) ; + let mut secondline : String = String::new( ) ; + io::stdin( ).read_line( &mut secondline ).unwrap( ) ; + let another_line : &str = &*secondline ; + let numbers : Vec = entered_line.split_whitespace( ).map( + | s | s.trim( ).parse::( ).unwrap( ) ).collect( ) ; + let numline = another_line.trim( ) ; + let diff : i32 = numline.parse::( ).unwrap( ) ; + let it = (0..numbers.len( )).combinations( 3 ) ; + let mut result : u32 = 0 ; + for a_combi in it { + let mut selected : Vec = Vec::new( ) ; + for i in a_combi { + selected.push( numbers[ i ] ) ; + } + if selected[ 1 ] - selected[ 0 ] == diff && + selected[ 2 ] - selected[ 1 ] == diff { + result += 1 ; + } + } + println!("{}" , result ) ; +} diff --git a/challenge-241/ulrich-rieke/rust/ch-2.rs b/challenge-241/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..601e84e0ff --- /dev/null +++ b/challenge-241/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,46 @@ +use std::io ; + +//for theoretical reasons, the smallest divisor of a number must be +//prime! It either is the smallest divisor, then it can't be subdivided +//further and therefore is prime, or it isn't the smallest + +fn smallest_divisor( number : u32 ) -> u32 { + let mut divisor : u32 = 2 ; + while number % divisor != 0 { + divisor += 1 ; + } + divisor +} + +fn prime_decompose( mut number : u32 ) -> Vec { + let mut prime_factors : Vec = Vec::new( ) ; + while number != 1 { + let divisor : u32 = smallest_divisor( number ) ; + prime_factors.push( divisor ) ; + number /= divisor ; + } + prime_factors +} + +fn main() { + println!("Enter some unique positive integers greater than 2!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let mut numbers : Vec = entered_line.split_whitespace( ).map( + | s | s.trim( ).parse::( ).unwrap( ) ).collect( ) ; + let nums = numbers.as_mut_slice( ) ; + nums.sort_unstable_by( |a , b| { + let factors_a : Vec = prime_decompose( *a ) ; + let factors_b : Vec = prime_decompose( *b ) ; + let len_a = factors_a.len( ) ; + let len_b = factors_b.len( ) ; + if len_a != len_b { + len_a.cmp( &len_b ) + } + else { + a.cmp( &b ) + } + }) ; + println!("{:?}" , nums ) ; +} diff --git a/stats/pwc-challenge-240.json b/stats/pwc-challenge-240.json new file mode 100644 index 0000000000..6b8d4a8ffa --- /dev/null +++ b/stats/pwc-challenge-240.json @@ -0,0 +1,715 @@ +{ + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Adam Russell", + "name" : "Adam Russell", + "y" : 4 + }, + { + "drilldown" : "Ali Moradi", + "y" : 5, + "name" : "Ali Moradi" + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 5 + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" + }, + { + "drilldown" : "Augie De Blieck Jr.", + "y" : 3, + "name" : "Augie De Blieck Jr." + }, + { + "name" : "BarrOff", + "y" : 4, + "drilldown" : "BarrOff" + }, + { + "name" : "Bob Lied", + "y" : 3, + "drilldown" : "Bob Lied" + }, + { + "y" : 2, + "name" : "Bruce Gray", + "drilldown" : "Bruce Gray" + }, + { + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", + "y" : 2 + }, + { + "drilldown" : "Clifton Wood", + "name" : "Clifton Wood", + "y" : 2 + }, + { + "drilldown" : "Dave Jacoby", + "y" : 2, + "name" : "Dave Jacoby" + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "y" : 2, + "name" : "E. Choroba" + }, + { + "drilldown" : "Ian Rifkin", + "name" : "Ian Rifkin", + "y" : 5 + }, + { + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "y" : 2, + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "y" : 2 + }, + { + "drilldown" : "Kjetil Skotheim", + "y" : 2, + "name" : "Kjetil Skotheim" + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 5, + "name" : "Lubos Kolouch" + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 10 + }, + { + "drilldown" : "Mariano Spadaccini", + "name" : "Mariano Spadaccini", + "y" : 2 + }, + { + "y" : 2, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "y" : 2, + "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "y" : 3, + "drilldown" : "Matthias Muth" + }, + { + "name" : "Niels van Dijke", + "y" : 2, + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Packy Anderson", + "y" : 5, + "name" : "Packy Anderson" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "drilldown" : "Peter Meszaros", + "y" : 2, + "name" : "Peter Meszaros" + }, + { + "drilldown" : "Raghu R", + "y" : 2, + "name" : "Raghu R" + }, + { + "drilldown" : "rcmlz", + "y" : 2, + "name" : "rcmlz" + }, + { + "name" : "Robbie Hatley", + "y" : 3, + "drilldown" : "Robbie Hatley" + }, + { + "y" : 4, + "name" : "Robert DiCicco", + "drilldown" : "Robert DiCicco" + }, + { + "name" : "Roger Bell_West", + "y" : 5, + "drilldown" : "Roger Bell_West" + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler", + "y" : 4 + }, + { + "y" : 4, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "y" : 3, + "name" : "W. Luis Mochan" + } + ], + "name" : "The Weekly Challenge - 240" + } + ], + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "subtitle" : { + "text" : "[Champions: 37] Last updated at 2023-10-31 17:04:22 GMT" + }, + "title" : { + "text" : "The Weekly Challenge - 240" + }, + "xAxis" : { + "type" : "category" + }, + "chart" : { + "type" : "column" + }, + "drilldown" : { + "series" : [ + { + "id" : "Adam Russell", + "name" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "id" : "Ali Moradi", + "name" : "Ali Moradi", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Arne Sommer", + "id" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Athanasius" + }, + { + "name" : "Augie De Blieck Jr.", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Augie De Blieck Jr." + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "BarrOff", + "id" : "BarrOff" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Bob Lied", + "id" : "Bob Lied" + }, + { + "name" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Bruce Gray" + }, + { + "name" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Cheok-Yin Fung" + }, + { + "id" : "Clifton Wood", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Clifton Wood" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Dave Jacoby", + "id" : "Dave Jacoby" + }, + { + "name" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "David Ferrone" + }, + { + "id" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Ian Rifkin", + "id" : "Ian Rifkin" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas" + }, + { + "name" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Jan Krnavek" + }, + { + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Kjetil Skotheim", + "id" : "Kjetil Skotheim" + }, + { + "id" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Lubos Kolouch" + }, + { + "id" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 8 + ] + ], + "name" : "Luca Ferrari" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Mariano Spadaccini", + "id" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Mark Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh" + }, + { + "id" : "Matthias Muth", + "name" : "Matthias Muth", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Niels van Dijke", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Niels van Dijke" + }, + { + "id" : "Packy Anderson", + "name" : "Packy Anderson", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Peter Campbell Smith" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Peter Meszaros", + "id" : "Peter Meszaros" + }, + { + "name" : "Raghu R", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Raghu R" + }, + { + "id" : "rcmlz", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "rcmlz" + }, + { + "id" : "Robbie Hatley", + "name" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Robert DiCicco", + "id" : "Robert DiCicco" + }, + { + "id" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Roger Bell_West" + }, + { + "id" : "Simon Green", + "name" : "Simon Green", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Thomas Kohler" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" + }, + { + "id" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "W. Luis Mochan" + } + ] + }, + "legend" : { + "enabled" : 0 + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 85a9a4bbe6..3cd2c436a2 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,222 +1,21 @@ { - "series" : [ - { - "data" : [ - { - "drilldown" : "Adam Russell", - "name" : "Adam Russell", - "y" : 4 - }, - { - "name" : "Ali Moradi", - "drilldown" : "Ali Moradi", - "y" : 5 - }, - { - "y" : 5, - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 4 - }, - { - "y" : 3, - "drilldown" : "Augie De Blieck Jr.", - "name" : "Augie De Blieck Jr." - }, - { - "name" : "BarrOff", - "drilldown" : "BarrOff", - "y" : 4 - }, - { - "drilldown" : "Bob Lied", - "name" : "Bob Lied", - "y" : 3 - }, - { - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray", - "y" : 2 - }, - { - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung", - "y" : 2 - }, - { - "name" : "Clifton Wood", - "drilldown" : "Clifton Wood", - "y" : 2 - }, - { - "y" : 2, - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby" - }, - { - "name" : "David Ferrone", - "drilldown" : "David Ferrone", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "E. Choroba", - "name" : "E. Choroba" - }, - { - "y" : 5, - "drilldown" : "Ian Rifkin", - "name" : "Ian Rifkin" - }, - { - "name" : "Jaldhar H. Vyas", - "drilldown" : "Jaldhar H. Vyas", - "y" : 5 - }, - { - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek", - "y" : 2 - }, - { - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey", - "y" : 2 - }, - { - "y" : 2, - "name" : "Kjetil Skotheim", - "drilldown" : "Kjetil Skotheim" - }, - { - "name" : "Lubos Kolouch", - "drilldown" : "Lubos Kolouch", - "y" : 5 - }, - { - "y" : 10, - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" - }, - { - "drilldown" : "Mariano Spadaccini", - "name" : "Mariano Spadaccini", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson" - }, - { - "y" : 2, - "drilldown" : "Matthew Neleigh", - "name" : "Matthew Neleigh" - }, - { - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth", - "y" : 3 - }, - { - "name" : "Niels van Dijke", - "drilldown" : "Niels van Dijke", - "y" : 2 - }, - { - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", - "y" : 3 - }, - { - "name" : "Peter Meszaros", - "drilldown" : "Peter Meszaros", - "y" : 2 - }, - { - "drilldown" : "Raghu R", - "name" : "Raghu R", - "y" : 2 - }, - { - "drilldown" : "rcmlz", - "name" : "rcmlz", - "y" : 2 - }, - { - "y" : 3, - "name" : "Robbie Hatley", - "drilldown" : "Robbie Hatley" - }, - { - "y" : 4, - "name" : "Robert DiCicco", - "drilldown" : "Robert DiCicco" - }, - { - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West", - "y" : 5 - }, - { - "y" : 3, - "name" : "Simon Green", - "drilldown" : "Simon Green" - }, - { - "drilldown" : "Thomas Kohler", - "name" : "Thomas Kohler", - "y" : 4 - }, - { - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke", - "y" : 4 - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - } - ], - "name" : "The Weekly Challenge - 240", - "colorByPoint" : 1 - } - ], - "xAxis" : { - "type" : "category" + "legend" : { + "enabled" : 0 }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 } }, - "chart" : { - "type" : "column" - }, "drilldown" : { "series" : [ { - "name" : "Adam Russell", - "id" : "Adam Russell", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 2 - ] - ] - }, - { - "name" : "Ali Moradi", "id" : "Ali Moradi", + "name" : "Ali Moradi", "data" : [ [ "Perl", @@ -233,206 +32,47 @@ ] }, { + "id" : "Dave Jacoby", + "name" : "Dave Jacoby", "data" : [ [ "Perl", 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Athanasius", - "id" : "Athanasius" - }, - { - "id" : "Augie De Blieck Jr.", - "name" : "Augie De Blieck Jr.", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "BarrOff", - "name" : "BarrOff" - }, - { - "name" : "Bob Lied", - "id" : "Bob Lied", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "id" : "Bruce Gray", - "name" : "Bruce Gray", - "data" : [ - [ - "Raku", - 2 ] ] }, { + "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] ], - "id" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" - }, - { - "id" : "Clifton Wood", - "name" : "Clifton Wood", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Dave Jacoby", - "id" : "Dave Jacoby" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "David Ferrone", "name" : "David Ferrone" }, { - "data" : [ - [ - "Perl", - 2 - ] - ], "name" : "E. Choroba", - "id" : "E. Choroba" - }, - { "data" : [ [ "Perl", 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 ] ], - "id" : "Ian Rifkin", - "name" : "Ian Rifkin" + "id" : "E. Choroba" }, { - "name" : "Jaldhar H. Vyas", - "id" : "Jaldhar H. Vyas", + "id" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim", "data" : [ [ "Perl", 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Jan Krnavek", - "id" : "Jan Krnavek", - "data" : [ - [ - "Raku", - 2 ] ] }, { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Kjetil Skotheim", - "id" : "Kjetil Skotheim" - }, - { + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -447,11 +87,9 @@ 1 ] ], - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "id" : "Lubos Kolouch" }, { - "name" : "Luca Ferrari", "id" : "Luca Ferrari", "data" : [ [ @@ -462,31 +100,22 @@ "Blog", 8 ] - ] - }, - { - "id" : "Mariano Spadaccini", - "name" : "Mariano Spadaccini", - "data" : [ - [ - "Perl", - 2 - ] - ] + ], + "name" : "Luca Ferrari" }, { - "id" : "Mark Anderson", - "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Mark Anderson", + "id" : "Mark Anderson" }, { - "name" : "Matthew Neleigh", - "id" : "Matthew Neleigh", + "id" : "Niels van Dijke", + "name" : "Niels van Dijke", "data" : [ [ "Perl", @@ -495,28 +124,22 @@ ] }, { + "id" : "Packy Anderson", + "name" : "Packy Anderson", "data" : [ [ "Perl", 2 ], + [ + "Raku", + 2 + ], [ "Blog", 1 ] - ], - "id" : "Matthias Muth", - "name" : "Matthias Muth" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Niels van Dijke", - "id" : "Niels van Dijke" + ] }, { "data" : [ @@ -529,18 +152,8 @@ 1 ] ], - "id" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith" - }, - { - "id" : "Peter Meszaros", - "name" : "Peter Meszaros", - "data" : [ - [ - "Perl", - 2 - ] - ] + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith" }, { "data" : [ @@ -549,18 +162,8 @@ 2 ] ], - "id" : "Raghu R", - "name" : "Raghu R" - }, - { "name" : "rcmlz", - "id" : "rcmlz", - "data" : [ - [ - "Raku", - 2 - ] - ] + "id" : "rcmlz" }, { "id" : "Robbie Hatley", @@ -577,8 +180,8 @@ ] }, { - "id" : "Robert DiCicco", - "name" : "Robert DiCicco", + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -591,38 +194,8 @@ ] }, { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Simon Green", - "name" : "Simon Green" - }, - { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", "data" : [ [ "Perl", @@ -632,11 +205,10 @@ "Blog", 2 ] - ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + ] }, { + "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -647,7 +219,6 @@ 2 ] ], - "id" : "Ulrich Rieke", "name" : "Ulrich Rieke" }, { @@ -666,27 +237,119 @@ } ] }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Ali Moradi", + "y" : 5, + "name" : "Ali Moradi" + }, + { + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby", + "y" : 2 + }, + { + "name" : "David Ferrone", + "y" : 2, + "drilldown" : "David Ferrone" + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Kjetil Skotheim", + "y" : 2, + "name" : "Kjetil Skotheim" + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 5, + "name" : "Lubos Kolouch" + }, + { + "y" : 10, + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson", + "y" : 2 + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Packy Anderson", + "name" : "Packy Anderson", + "y" : 5 + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "drilldown" : "rcmlz", + "name" : "rcmlz", + "y" : 2 + }, + { + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", + "y" : 3 + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 4 + }, + { + "name" : "Thomas Kohler", + "y" : 4, + "drilldown" : "Thomas Kohler" + }, + { + "name" : "Ulrich Rieke", + "y" : 4, + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ], + "name" : "The Weekly Challenge - 241" } + ], + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "subtitle" : { + "text" : "[Champions: 17] Last updated at 2023-10-31 17:11:57 GMT" }, "tooltip" : { - "followPointer" : 1, "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" + "headerFormat" : "{series.name}
", + "followPointer" : 1 }, "title" : { - "text" : "The Weekly Challenge - 240" + "text" : "The Weekly Challenge - 241" }, - "legend" : { - "enabled" : 0 + "chart" : { + "type" : "column" }, - "subtitle" : { - "text" : "[Champions: 36] Last updated at 2023-10-30 00:02:37 GMT" + "xAxis" : { + "type" : "category" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index f5c9bc4be3..6a3afa77b3 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,63 +1,63 @@ { - "xAxis" : { - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - }, - "type" : "category" - }, "yAxis" : { "min" : 0, "title" : { "text" : null } }, - "chart" : { - "type" : "column" - }, "series" : [ { - "name" : "Contributions", "dataLabels" : { + "color" : "#FFFFFF", + "align" : "right", + "enabled" : "true", "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, - "format" : "{point.y:.0f}", "y" : 10, - "enabled" : "true", "rotation" : -90, - "color" : "#FFFFFF", - "align" : "right" + "format" : "{point.y:.0f}" }, "data" : [ [ "Blog", - 4119 + 4136 ], [ "Perl", - 12378 + 12408 ], [ "Raku", - 7139 + 7157 ] - ] + ], + "name" : "Contributions" } ], - "subtitle" : { - "text" : "Last updated at 2023-10-30 00:02:37 GMT" - }, "legend" : { "enabled" : "false" }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" + "chart" : { + "type" : "column" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category"