From b60cb77fe463f9c97a8170868a2ff874554d5f41 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 28 Nov 2023 11:53:44 +0000 Subject: - Added solutions by PokGoPun. - Added solutions by Luca Ferrari. - Added solutions by Humberto Massa. - Added solutions by Niels van Dijke. - Added solutions by Peter Campbell Smith. - Added solutions by Dave Jacoby. - Added solutions by Thomas Kohler. - Added solutions by Peter Meszaros. - Added solutions by E. Choroba. - Added solutions by David Ferrone. - Added solutions by W. Luis Mochan. - Added solutions by Mariano Spadaccini. --- challenge-245/clifton-wood/raku/ch-1.sh | 1 + challenge-245/clifton-wood/raku/ch-2.sh | 1 + challenge-245/eric-cheung/python/ch-1.py | 12 + challenge-245/eric-cheung/python/ch-2.py | 8 + challenge-245/perlboy1967/perl/ch-1.pl | 39 + challenge-245/perlboy1967/perl/ch-2.pl | 49 + challenge-245/perlboy1967/perl/ch1.pl | 39 - challenge-245/perlboy1967/perl/ch2.pl | 49 - challenge-245/ulrich-rieke/cpp/ch-1.cpp | 47 + challenge-245/ulrich-rieke/haskell/ch-1.hs | 15 + challenge-245/ulrich-rieke/haskell/ch-2.hs | 30 + challenge-245/ulrich-rieke/perl/ch-1.pl | 20 + challenge-245/ulrich-rieke/perl/ch-2.pl | 57 + challenge-245/ulrich-rieke/raku/ch-1.raku | 15 + challenge-245/ulrich-rieke/raku/ch-2.raku | 55 + challenge-245/ulrich-rieke/rust/ch-1.rs | 25 + challenge-245/ulrich-rieke/rust/ch-2.rs | 45 + challenge-245/ziameraj16/java/SortLanguage.java | 17 + stats/pwc-challenge-244.json | 715 ++++++++++ stats/pwc-current.json | 578 +-------- stats/pwc-language-breakdown-summary.json | 74 +- stats/pwc-language-breakdown.json | 1575 ++++++++++++----------- stats/pwc-leaders.json | 416 +++--- stats/pwc-summary-1-30.json | 40 +- stats/pwc-summary-121-150.json | 50 +- stats/pwc-summary-151-180.json | 46 +- stats/pwc-summary-181-210.json | 22 +- stats/pwc-summary-211-240.json | 58 +- stats/pwc-summary-241-270.json | 32 +- stats/pwc-summary-271-300.json | 116 +- stats/pwc-summary-301-330.json | 20 +- stats/pwc-summary-31-60.json | 34 +- stats/pwc-summary-61-90.json | 112 +- stats/pwc-summary-91-120.json | 108 +- stats/pwc-summary.json | 68 +- 35 files changed, 2611 insertions(+), 1977 deletions(-) create mode 100644 challenge-245/clifton-wood/raku/ch-1.sh create mode 100644 challenge-245/clifton-wood/raku/ch-2.sh create mode 100755 challenge-245/eric-cheung/python/ch-1.py create mode 100755 challenge-245/eric-cheung/python/ch-2.py create mode 100755 challenge-245/perlboy1967/perl/ch-1.pl create mode 100755 challenge-245/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-245/perlboy1967/perl/ch1.pl delete mode 100755 challenge-245/perlboy1967/perl/ch2.pl create mode 100755 challenge-245/ulrich-rieke/cpp/ch-1.cpp create mode 100755 challenge-245/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-245/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-245/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-245/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-245/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-245/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-245/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-245/ulrich-rieke/rust/ch-2.rs create mode 100644 challenge-245/ziameraj16/java/SortLanguage.java create mode 100644 stats/pwc-challenge-244.json diff --git a/challenge-245/clifton-wood/raku/ch-1.sh b/challenge-245/clifton-wood/raku/ch-1.sh new file mode 100644 index 0000000000..377ecf4a92 --- /dev/null +++ b/challenge-245/clifton-wood/raku/ch-1.sh @@ -0,0 +1 @@ +raku -e 'my @lang = ("perl", "c", "python"); my @popularity = (2, 1, 3); sub sort-by-popularity { (@lang [Z] @popularity).sort( *.tail ).map( *.head ) }; sort-by-popularity.gist.say; @lang = ("c++", "haskell", "java"); @popularity = (1, 3, 2); sort-by-popularity.gist.say' diff --git a/challenge-245/clifton-wood/raku/ch-2.sh b/challenge-245/clifton-wood/raku/ch-2.sh new file mode 100644 index 0000000000..2d093899f6 --- /dev/null +++ b/challenge-245/clifton-wood/raku/ch-2.sh @@ -0,0 +1 @@ +raku -e 'sub TWC245_2 (@a) { @a.combinations.map( |*.permutations ).grep( +* ).map( |*.permutations ).map( *.join.Int ).sort( -* ).grep({ $_ % 3 == 0 }).head || -1 }; (8,9, 1).&TWC245_2.say; (8, 6, 7, 1, 0).&TWC245_2.say, @(1).&TWC245_2.say' diff --git a/challenge-245/eric-cheung/python/ch-1.py b/challenge-245/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..35addf394d --- /dev/null +++ b/challenge-245/eric-cheung/python/ch-1.py @@ -0,0 +1,12 @@ + +## Example 1 +## arrLang = ["perl", "c", "python"] +## arrPopularity = [2, 1, 3] + +## Example 2 +arrLang = ["c++", "haskell", "java"] +arrPopularity = [1, 3, 2] + +arrOutput = [arrLangLoop for arrPopularityLoop, arrLangLoop in sorted(zip(arrPopularity, arrLang))] + +print (arrOutput) diff --git a/challenge-245/eric-cheung/python/ch-2.py b/challenge-245/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..9f531e288b --- /dev/null +++ b/challenge-245/eric-cheung/python/ch-2.py @@ -0,0 +1,8 @@ + +## arrDigits = [8, 1, 9] ## Example 1 +arrDigits = [8, 6, 7, 1, 0] ## Example 2 + +if sum(arrDigits) % 3 == 0: + print ("".join(sorted([str(DigitLoop) for DigitLoop in arrDigits], reverse = True))) +else: + print (-1) diff --git a/challenge-245/perlboy1967/perl/ch-1.pl b/challenge-245/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..93878d5564 --- /dev/null +++ b/challenge-245/perlboy1967/perl/ch-1.pl @@ -0,0 +1,39 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 245 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-245 + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Sort Language +Submitted by: Mohammad S Anwar + +You are given two array of languages and its popularity. + +Write a script to sort the language based on popularity. + +=cut + +use v5.32; +use common::sense; + +use Test2::V0; + +use List::MoreUtils qw(pairwise); + +sub sortLanguage (\@\@) { + map { $_->[0] } + sort { $a->[1] <=> $b->[1] or $a->[0] cmp $b->[0] } + pairwise { [$a,$b] } @{$_[0]},@{$_[1]}; +} + +is([sortLanguage(@{[qw{Perl C Python}]},@{[2,1,3]})], + [qw(C Perl Python)]); +is([sortLanguage(@{[qw{C++ Haskell Java}]},@{[1,3,2]})], + [qw(C++ Java Haskell)]); +is([sortLanguage(@{[qw{C Basic Assembly}]},@{[1,1,1]})], + [qw(Assembly Basic C)]); + +done_testing; diff --git a/challenge-245/perlboy1967/perl/ch-2.pl b/challenge-245/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..8c18d7fde4 --- /dev/null +++ b/challenge-245/perlboy1967/perl/ch-2.pl @@ -0,0 +1,49 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 245 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-245 + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Largest of Three +Submitted by: Mohammad S Anwar + +You are given an array of integers >= 0. + +Write a script to return the largest number formed by concatenating some of the given +integers in any order which is also multiple of 3. Return -1 if none found. + +=cut + +use v5.32; +use common::sense; + +use Test2::V0; + +use Algorithm::Combinatorics qw(permutations subsets); + +sub largestOfThree (@) { + my @l = sort { $b <=> $a } @_; + + my $subsetSize = $#l+1; + while ($subsetSize > 0) { + for my $subset (subsets(\@l,$subsetSize)) { + my @subset = sort { $b <=> $a } @$subset; + for my $p (permutations(\@subset)) { + my $s = join('',@$p); + return $s if ($s % 3 == 0); + } + $subsetSize--; + } + } + return -1; +} + + +is(largestOfThree(8,1,9),981); +is(largestOfThree(8,6,7,1,0),8760); +is(largestOfThree(1),-1); + +done_testing; diff --git a/challenge-245/perlboy1967/perl/ch1.pl b/challenge-245/perlboy1967/perl/ch1.pl deleted file mode 100755 index 93878d5564..0000000000 --- a/challenge-245/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 245 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-245 - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Sort Language -Submitted by: Mohammad S Anwar - -You are given two array of languages and its popularity. - -Write a script to sort the language based on popularity. - -=cut - -use v5.32; -use common::sense; - -use Test2::V0; - -use List::MoreUtils qw(pairwise); - -sub sortLanguage (\@\@) { - map { $_->[0] } - sort { $a->[1] <=> $b->[1] or $a->[0] cmp $b->[0] } - pairwise { [$a,$b] } @{$_[0]},@{$_[1]}; -} - -is([sortLanguage(@{[qw{Perl C Python}]},@{[2,1,3]})], - [qw(C Perl Python)]); -is([sortLanguage(@{[qw{C++ Haskell Java}]},@{[1,3,2]})], - [qw(C++ Java Haskell)]); -is([sortLanguage(@{[qw{C Basic Assembly}]},@{[1,1,1]})], - [qw(Assembly Basic C)]); - -done_testing; diff --git a/challenge-245/perlboy1967/perl/ch2.pl b/challenge-245/perlboy1967/perl/ch2.pl deleted file mode 100755 index 8c18d7fde4..0000000000 --- a/challenge-245/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 245 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-245 - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Largest of Three -Submitted by: Mohammad S Anwar - -You are given an array of integers >= 0. - -Write a script to return the largest number formed by concatenating some of the given -integers in any order which is also multiple of 3. Return -1 if none found. - -=cut - -use v5.32; -use common::sense; - -use Test2::V0; - -use Algorithm::Combinatorics qw(permutations subsets); - -sub largestOfThree (@) { - my @l = sort { $b <=> $a } @_; - - my $subsetSize = $#l+1; - while ($subsetSize > 0) { - for my $subset (subsets(\@l,$subsetSize)) { - my @subset = sort { $b <=> $a } @$subset; - for my $p (permutations(\@subset)) { - my $s = join('',@$p); - return $s if ($s % 3 == 0); - } - $subsetSize--; - } - } - return -1; -} - - -is(largestOfThree(8,1,9),981); -is(largestOfThree(8,6,7,1,0),8760); -is(largestOfThree(1),-1); - -done_testing; diff --git a/challenge-245/ulrich-rieke/cpp/ch-1.cpp b/challenge-245/ulrich-rieke/cpp/ch-1.cpp new file mode 100755 index 0000000000..fb9584efcf --- /dev/null +++ b/challenge-245/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,47 @@ +#include +#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 computer languages, separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector languages( split( line , " " ) ) ; + std::cout << "Enter some popularity indices, separated by blanks!\n" ; + std::getline( std::cin , line ) ; + std::vector pops ( split( line , " " ) ) ; + std::vector popularities ; + for ( auto s : pops ) + popularities.push_back( std::stoi( s ) ) ; + int len = languages.size( ) ; + std::vector> pop_pairs ; + for ( int i = 0 ; i < len ; i++ ) { + pop_pairs.push_back( std::make_pair( popularities[ i ] , languages[ i ] ) ) ; + } + std::sort( pop_pairs.begin( ) , pop_pairs.end( ) , []( const auto & p1 , + const auto & p2 ) { return p1.first < p2.first ; } ) ; + std::cout << "(" ; + for ( const auto & p : pop_pairs ) { + std::cout << p.second ; + if ( p != pop_pairs.back( ) ) { + std::cout << "," ; + } + } + std::cout << ")\n" ; + return 0 ; +} diff --git a/challenge-245/ulrich-rieke/haskell/ch-1.hs b/challenge-245/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..76402219ac --- /dev/null +++ b/challenge-245/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,15 @@ +module Challenge245 + where +import Data.List ( sortOn ) ; + +solution :: [String] -> [Int] -> [String] +solution languages popularities = map fst $ sortOn snd $ zip languages popularities + +main :: IO ( ) +main = do + putStrLn "Enter some computer languages, separated by blanks!" + languages <- getLine + putStrLn "Enter some corresponding popularities, separated by blanks!" + popularities <- getLine + let pops = map read $ words popularities + print $ solution ( words languages ) pops diff --git a/challenge-245/ulrich-rieke/haskell/ch-2.hs b/challenge-245/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..85e9691ca8 --- /dev/null +++ b/challenge-245/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,30 @@ +module Challenge245_2 + where +import Data.List ( permutations , sort ) + +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 ) ] + +concatenate :: [Int] -> Int +concatenate list + |length list == 1 = head list + |otherwise = read $ foldl1 ( ++ ) $ map show list + +solution :: [Int] -> Int +solution list + |length sorted == 0 = -1 + |otherwise = last sorted + where + possiblePermus = map concatenate $ concat $ map permutations $ concat $ map + (\i -> combinations i list )[1..length list] + sorted = sort $ filter (\n -> mod n 3 == 0 ) possiblePermus + +main :: IO ( ) +main = do + putStrLn "Please enter some integers greater than 0 , separated by blanks!" + numberstrings <- getLine + let numbers = if length numberstrings == 1 then [read numberstrings] + else map read $ words numberstrings + print $ solution numbers diff --git a/challenge-245/ulrich-rieke/perl/ch-1.pl b/challenge-245/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..eacac696c7 --- /dev/null +++ b/challenge-245/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +say "Enter some programming languages, separated by blanks!" ; +my $line = ; +chomp $line ; +my @languages = split( /\s/ , $line ) ; +say "Enter some popularity indices, separated by blanks!" ; +$line = ; +chomp $line ; +my @popularity = split( /\s/ , $line ) ; +my @pairs ; +for my $i ( 0..scalar( @languages) - 1 ) { + push @pairs , [$popularity[ $i ] , $languages[ $i ]] ; +} +my @sorted = sort { $a->[0] <=> $b->[0] } @pairs ; +print "(" ; +say join( ',' , map { $_->[1] } @sorted ) . ")" diff --git a/challenge-245/ulrich-rieke/perl/ch-2.pl b/challenge-245/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..e62ff04b4d --- /dev/null +++ b/challenge-245/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,57 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use Algorithm::Combinatorics qw ( permutations combinations ) ; + +sub concatenate { + my $numbers = shift ; + my $concat ; + map { $concat .= $_ } @$numbers ; + return $concat ; +} + +say "Enter some numbers greater than 0 , separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my $iter = permutations( \@numbers ) ; +my @permuted ; +while ( my $c = $iter->next ) { + push @permuted , concatenate( $c ) ; +} +my @selected = grep { $_ % 3 == 0 } @permuted ; +if ( @selected ) { + my @sorted = sort { $b <=> $a } @selected ; + say $sorted[ 0 ] ; +} +else { + my $len = scalar( @numbers ) ; + my $i = $len ; + my @sorted ; + while ( $i != 1 ) { + @permuted = ( ) ; + $iter = combinations( \@numbers , $i ) ; + while ( my $c = $iter->next ) { + my @combi = @$c ; + my $permuiter = permutations( \@combi ) ; + while ( my $permuc = $permuiter->next ) { + push @permuted , concatenate( $permuc ) ; + } + } + @selected = grep { $_ % 3 == 0 } @permuted ; + if ( @selected ) { + @sorted = sort { $b <=> $a } @selected ; + last ; + } + else { + $i-- ; + } + } + if ( @selected ) { + say $sorted[0] ; + } + else { + say "-1" ; + } +} diff --git a/challenge-245/ulrich-rieke/raku/ch-1.raku b/challenge-245/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..2257e5dc20 --- /dev/null +++ b/challenge-245/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,15 @@ +use v6 ; + +say "Enter some computer languages, separated by blanks!" ; +my $line = $*IN.get ; +my @languages = $line.words ; +say "Enter some popularity indices for these languages!" ; +$line = $*IN.get ; +my @popularity = $line.words.map( {.Int} ) ; +my @pairs ; +for (0..@languages.elems - 1) -> $index { + @pairs.push( (@popularity[ $index ] , @languages[ $index ] ) ) ; +} +my @sorted = @pairs.sort( { $^a[0] cmp $^b[0] } ) ; +print "(" ; +say @sorted.map( {$_[1]} ).join( ',' ) ~ ")" ; diff --git a/challenge-245/ulrich-rieke/raku/ch-2.raku b/challenge-245/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..45b8866774 --- /dev/null +++ b/challenge-245/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,55 @@ +use v6 ; +#concatenate by gluing the digits together to a string and by converting +#them to an int afterwards +sub concatenate( $aSequence ) { + my $total ; + my $len = $aSequence.elems ; + for (0..$len - 1 ) -> $num { + $total ~= $aSequence[ $num ].Str ; + } + return $total.Int ; +} + +say "Enter some integers greater than 0 , separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my @permuted ; #for the concatenated permutations +my @permutations = @numbers.permutations( ) ; +for @permutations -> $permu { + @permuted.push( concatenate( $permu ) ) ; +} +my @selected = @permuted.grep( { $_ %% 3 } ) ; +if ( @selected.elems > 0 ) { + @selected .= sort ; #sort in ascending order + say @selected[*-1] ; #and select the largest one +} +else {#create combinations of decreasing length and permutate each +#combination. Stop when a number divisible by 3 has been found + my $len = @numbers.elems ; + my $i = $len ; + @permuted = ( ) ;#clear the array we've used before + while ( $i != 1 ) { + my @combinations = @numbers.combinations( $i ) ; + for @combinations -> $combi { + my @permu = $combi.permutations( ) ; + for @permu -> $aPermu { + my $concat = concatenate( $aPermu ) ; + @permuted.push( $concat ) ; + } + } + @selected = @permuted.grep( { $_ %% 3 } ) ; + if ( @selected ) { + @selected .= sort ; + last ; + } + else { + $i-- ; + } + } + if ( @selected ) { + say @selected[*-1] ; + } + else { + say "-1" ; + } +} diff --git a/challenge-245/ulrich-rieke/rust/ch-1.rs b/challenge-245/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..6fde09a21b --- /dev/null +++ b/challenge-245/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,25 @@ +use std::io ; + +fn main() { + println!("Enter some computer languages, separated by blanks!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let languages : Vec<&str> = entered_line.split_whitespace( ).map( | s | + s.trim( ) ).collect( ) ; + println!("Enter as many popularity indices, separated by blanks!") ; + let mut snd_line : String = String::new( ) ; + io::stdin( ).read_line( &mut snd_line ).unwrap( ) ; + let second_line : &str = &*snd_line ; + let popularity : Vec = second_line.split_whitespace( ).map( | s | + s.trim( ).parse::( ).unwrap( ) ).collect( ) ; + let mut contest : Vec<(u8 , &str)> = Vec::new( ) ; + let mut iter = popularity.iter( ).zip(languages.iter( ) ) ; + while let Some( ( &i , &lang ) ) = iter.next( ) { + contest.push( (i , lang ) ) ; + } + contest.sort_by( | a , b | a.0.cmp( &b.0 ) ) ; + print!("(" ) ; + contest.iter( ).for_each( | p | print!("{:?} " , p.1 ) ) ; + println!(")" ) ; +} diff --git a/challenge-245/ulrich-rieke/rust/ch-2.rs b/challenge-245/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..8db9155423 --- /dev/null +++ b/challenge-245/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,45 @@ +use std::io ; +use itertools::Itertools ; + +fn concatenate( nums : Vec<&u32> ) -> u32 { + let mut total : String = String::new( ) ; + for n in nums { + let str : String = (*n).to_string( ) ; + total.push_str( &str ) ; + } + let numberstr : &str = total.as_str( ) ; + numberstr.parse::().unwrap( ) +} + +fn main() { + println!("Enter some integers greater than 0 , separated by blanks!"); + 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( ) ; + let len = numbers.len( ) ; + let mut selected : Vec = Vec::new( ) ; + let mut i : usize = len ; + while i != 1 { + let perms = numbers.iter( ).permutations( i ) ; + let mut permuted : Vec = Vec::new( ) ; + for vec in perms { + let concat : u32 = concatenate( vec ) ; + permuted.push( concat ) ; + } + permuted.iter( ).filter( | n | *n % 3 == 0 ).for_each( | num | + selected.push( *num ) ) ; + if selected.len( ) > 0 { + selected.sort_by( | a , b | b.cmp( a ) ) ; + break ; + } + i -= 1 ; + } + if selected.len( ) > 0 { + println!("{}" , selected[0] ) ; + } + else { + println!("-1") ; + } +} diff --git a/challenge-245/ziameraj16/java/SortLanguage.java b/challenge-245/ziameraj16/java/SortLanguage.java new file mode 100644 index 0000000000..510c860ec0 --- /dev/null +++ b/challenge-245/ziameraj16/java/SortLanguage.java @@ -0,0 +1,17 @@ +import java.util.*; + +public class SortLanguage { + + public static void main(String[] args) { + final Scanner scanner = new Scanner(System.in); + System.out.println("Enter comma separated languages"); + List languages = Arrays.stream(scanner.nextLine().split(",")).toList(); + System.out.println("Enter comma separated popularity value"); + List popularityList = Arrays.stream(scanner.nextLine().split(",")).map(Integer::valueOf).toList(); + List output = new ArrayList<>(popularityList.size()); + for (int i = 1; i <= popularityList.size(); i++) { + output.add(languages.get(popularityList.indexOf(i))); + } + System.out.println(output); + } +} diff --git a/stats/pwc-challenge-244.json b/stats/pwc-challenge-244.json new file mode 100644 index 0000000000..db7719e16c --- /dev/null +++ b/stats/pwc-challenge-244.json @@ -0,0 +1,715 @@ +{ + "drilldown" : { + "series" : [ + { + "id" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Adam Russell" + }, + { + "name" : "Ali Moradi", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Ali Moradi" + }, + { + "id" : "Arne Sommer", + "name" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Athanasius", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Athanasius" + }, + { + "id" : "BarrOff", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 2 + ] + ], + "name" : "BarrOff" + }, + { + "id" : "Bob Lied", + "name" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Bruce Gray", + "name" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung" + }, + { + "name" : "Clifton Wood", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Clifton Wood" + }, + { + "id" : "Dave Jacoby", + "name" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "David Ferrone" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" + }, + { + "id" : "Humberto Massa", + "name" : "Humberto Massa", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Ian Rifkin", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Ian Rifkin" + }, + { + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey" + }, + { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch" + }, + { + "id" : "Luca Ferrari", + "name" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 8 + ] + ] + }, + { + "id" : "Mark Anderson", + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Matthias Muth", + "id" : "Matthias Muth" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Nelo Tovar", + "id" : "Nelo Tovar" + }, + { + "name" : "Niels van Dijke", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Niels van Dijke" + }, + { + "id" : "Packy Anderson", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Packy Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Paulo Custodio", + "id" : "Paulo Custodio" + }, + { + "id" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Peter Campbell Smith" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Peter Meszaros", + "id" : "Peter Meszaros" + }, + { + "name" : "rcmlz", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "rcmlz" + }, + { + "id" : "Robbie Hatley", + "name" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Robert Ransbottom", + "id" : "Robert Ransbottom" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" + }, + { + "id" : "Simon Green", + "name" : "Simon Green", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Thomas Kohler" + }, + { + "id" : "Ulrich Rieke", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Ulrich Rieke" + }, + { + "id" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "W. Luis Mochan" + } + ] + }, + "title" : { + "text" : "The Weekly Challenge - 244" + }, + "subtitle" : { + "text" : "[Champions: 37] Last updated at 2023-11-28 11:44:02 GMT" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "chart" : { + "type" : "column" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 + }, + "xAxis" : { + "type" : "category" + }, + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Adam Russell", + "name" : "Adam Russell", + "y" : 4 + }, + { + "y" : 5, + "name" : "Ali Moradi", + "drilldown" : "Ali Moradi" + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 3 + }, + { + "y" : 4, + "name" : "Athanasius", + "drilldown" : "Athanasius" + }, + { + "drilldown" : "BarrOff", + "name" : "BarrOff", + "y" : 3 + }, + { + "y" : 3, + "name" : "Bob Lied", + "drilldown" : "Bob Lied" + }, + { + "name" : "Bruce Gray", + "y" : 2, + "drilldown" : "Bruce Gray" + }, + { + "y" : 2, + "name" : "Cheok-Yin Fung", + "drilldown" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Clifton Wood", + "y" : 2, + "name" : "Clifton Wood" + }, + { + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby", + "y" : 3 + }, + { + "drilldown" : "David Ferrone", + "y" : 2, + "name" : "David Ferrone" + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Humberto Massa", + "name" : "Humberto Massa", + "y" : 2 + }, + { + "name" : "Ian Rifkin", + "y" : 3, + "drilldown" : "Ian Rifkin" + }, + { + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "name" : "Jan Krnavek", + "y" : 2, + "drilldown" : "Jan Krnavek" + }, + { + "drilldown" : "Jorg Sommrey", + "y" : 3, + "name" : "Jorg Sommrey" + }, + { + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "y" : 6 + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 5, + "name" : "Lubos Kolouch" + }, + { + "y" : 10, + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Matthias Muth", + "y" : 3, + "name" : "Matthias Muth" + }, + { + "drilldown" : "Nelo Tovar", + "y" : 2, + "name" : "Nelo Tovar" + }, + { + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke", + "y" : 2 + }, + { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { + "drilldown" : "Paulo Custodio", + "name" : "Paulo Custodio", + "y" : 2 + }, + { + "y" : 3, + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith" + }, + { + "y" : 2, + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros" + }, + { + "name" : "rcmlz", + "y" : 2, + "drilldown" : "rcmlz" + }, + { + "y" : 3, + "name" : "Robbie Hatley", + "drilldown" : "Robbie Hatley" + }, + { + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "y" : 2 + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "name" : "Thomas Kohler", + "y" : 4, + "drilldown" : "Thomas Kohler" + }, + { + "drilldown" : "Ulrich Rieke", + "y" : 4, + "name" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + } + ], + "name" : "The Weekly Challenge - 244" + } + ], + "legend" : { + "enabled" : 0 + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 8f29ace616..fa47405ae8 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,71 +1,26 @@ { - "legend" : { - "enabled" : 0 - }, "series" : [ { - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 244", "data" : [ { - "y" : 4, - "drilldown" : "Adam Russell", - "name" : "Adam Russell" - }, - { - "name" : "Ali Moradi", - "drilldown" : "Ali Moradi", - "y" : 5 - }, - { - "name" : "Arne Sommer", - "y" : 3, - "drilldown" : "Arne Sommer" - }, - { - "name" : "Athanasius", - "drilldown" : "Athanasius", - "y" : 4 - }, - { - "name" : "BarrOff", - "y" : 3, - "drilldown" : "BarrOff" - }, - { - "name" : "Bob Lied", - "drilldown" : "Bob Lied", - "y" : 3 - }, - { - "name" : "Bruce Gray", - "y" : 2, - "drilldown" : "Bruce Gray" - }, - { - "name" : "Cheok-Yin Fung", - "y" : 2, - "drilldown" : "Cheok-Yin Fung" - }, - { - "name" : "Clifton Wood", "drilldown" : "Clifton Wood", + "name" : "Clifton Wood", "y" : 2 }, { - "drilldown" : "Dave Jacoby", - "y" : 3, - "name" : "Dave Jacoby" + "name" : "Dave Jacoby", + "y" : 2, + "drilldown" : "Dave Jacoby" }, { + "drilldown" : "David Ferrone", "name" : "David Ferrone", - "y" : 2, - "drilldown" : "David Ferrone" + "y" : 2 }, { + "drilldown" : "E. Choroba", "name" : "E. Choroba", - "y" : 2, - "drilldown" : "E. Choroba" + "y" : 2 }, { "drilldown" : "Humberto Massa", @@ -73,114 +28,34 @@ "name" : "Humberto Massa" }, { - "y" : 3, - "drilldown" : "Ian Rifkin", - "name" : "Ian Rifkin" - }, - { - "y" : 5, - "drilldown" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" - }, - { - "name" : "Jan Krnavek", - "drilldown" : "Jan Krnavek", - "y" : 2 - }, - { - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey", - "y" : 3 - }, - { - "name" : "Laurent Rosenfeld", - "y" : 6, - "drilldown" : "Laurent Rosenfeld" - }, - { - "drilldown" : "Lubos Kolouch", - "y" : 5, - "name" : "Lubos Kolouch" - }, - { - "name" : "Luca Ferrari", "drilldown" : "Luca Ferrari", - "y" : 10 + "y" : 11, + "name" : "Luca Ferrari" }, { - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 + "y" : 1, + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini" }, { - "name" : "Matthew Neleigh", "y" : 2, - "drilldown" : "Matthew Neleigh" - }, - { - "name" : "Matthias Muth", - "y" : 3, - "drilldown" : "Matthias Muth" - }, - { - "name" : "Nelo Tovar", - "y" : 2, - "drilldown" : "Nelo Tovar" - }, - { "name" : "Niels van Dijke", - "y" : 2, "drilldown" : "Niels van Dijke" }, { - "drilldown" : "Packy Anderson", - "y" : 5, - "name" : "Packy Anderson" - }, - { - "y" : 2, - "drilldown" : "Paulo Custodio", - "name" : "Paulo Custodio" - }, - { - "name" : "Peter Campbell Smith", "y" : 3, + "name" : "Peter Campbell Smith", "drilldown" : "Peter Campbell Smith" }, { + "name" : "Peter Meszaros", "y" : 2, - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros" + "drilldown" : "Peter Meszaros" }, { - "y" : 2, - "drilldown" : "rcmlz", - "name" : "rcmlz" - }, - { - "drilldown" : "Robbie Hatley", - "y" : 3, - "name" : "Robbie Hatley" - }, - { - "drilldown" : "Robert Ransbottom", - "y" : 2, - "name" : "Robert Ransbottom" - }, - { - "drilldown" : "Roger Bell_West", - "y" : 5, - "name" : "Roger Bell_West" - }, - { - "drilldown" : "Simon Green", - "y" : 3, - "name" : "Simon Green" - }, - { - "drilldown" : "Thomas Kohler", "y" : 4, - "name" : "Thomas Kohler" + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler" }, { "drilldown" : "Ulrich Rieke", @@ -188,109 +63,40 @@ "name" : "Ulrich Rieke" }, { + "drilldown" : "W. Luis Mochan", "name" : "W. Luis Mochan", - "y" : 3, - "drilldown" : "W. Luis Mochan" + "y" : 3 } - ] + ], + "name" : "The Weekly Challenge - 245", + "colorByPoint" : 1 } ], "chart" : { "type" : "column" }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "legend" : { + "enabled" : 0 + }, "drilldown" : { "series" : [ { - "name" : "Adam Russell", - "id" : "Adam Russell", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 2 - ] - ] - }, - { - "name" : "Ali Moradi", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Ali Moradi" - }, - { - "name" : "Arne Sommer", - "id" : "Arne Sommer", - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "Athanasius", - "name" : "Athanasius" - }, - { - "name" : "BarrOff", - "id" : "BarrOff", - "data" : [ - [ - "Perl", - 1 - ], - [ - "Raku", - 2 - ] - ] - }, - { - "id" : "Bob Lied", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Bob Lied" - }, - { - "name" : "Bruce Gray", - "id" : "Bruce Gray", + "name" : "Clifton Wood", + "id" : "Clifton Wood", "data" : [ [ "Raku", @@ -299,162 +105,47 @@ ] }, { - "name" : "Cheok-Yin Fung", + "name" : "Dave Jacoby", "data" : [ [ "Perl", 2 ] ], - "id" : "Cheok-Yin Fung" - }, - { - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Clifton Wood", - "name" : "Clifton Wood" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" + "id" : "Dave Jacoby" }, { + "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] ], - "id" : "David Ferrone", "name" : "David Ferrone" }, { "name" : "E. Choroba", + "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ], - "id" : "E. Choroba" - }, - { - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Humberto Massa", - "name" : "Humberto Massa" - }, - { - "name" : "Ian Rifkin", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Ian Rifkin" - }, - { - "id" : "Jaldhar H. Vyas", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Jaldhar H. Vyas" - }, - { - "name" : "Jan Krnavek", - "id" : "Jan Krnavek", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { - "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] ] }, { - "name" : "Laurent Rosenfeld", + "name" : "Humberto Massa", "data" : [ - [ - "Perl", - 2 - ], [ "Raku", 2 - ], - [ - "Blog", - 2 - ] - ], - "id" : "Laurent Rosenfeld" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 ] ], - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "id" : "Humberto Massa" }, { + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -462,87 +153,24 @@ ], [ "Blog", - 8 + 9 ] ], - "id" : "Luca Ferrari", "name" : "Luca Ferrari" }, { - "name" : "Mark Anderson", - "id" : "Mark Anderson", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { + "name" : "Mariano Spadaccini", "data" : [ [ "Perl", - 2 - ] - ], - "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh" - }, - { - "name" : "Matthias Muth", - "id" : "Matthias Muth", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", 1 ] - ] - }, - { - "id" : "Nelo Tovar", - "data" : [ - [ - "Perl", - 2 - ] ], - "name" : "Nelo Tovar" + "id" : "Mariano Spadaccini" }, { + "name" : "Niels van Dijke", "id" : "Niels van Dijke", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Niels van Dijke" - }, - { - "name" : "Packy Anderson", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Packy Anderson" - }, - { - "name" : "Paulo Custodio", - "id" : "Paulo Custodio", "data" : [ [ "Perl", @@ -565,80 +193,14 @@ "id" : "Peter Campbell Smith" }, { - "name" : "Peter Meszaros", - "id" : "Peter Meszaros", - "data" : [ - [ - "Perl", - 2 - ] - ] - }, - { - "name" : "rcmlz", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "rcmlz" - }, - { - "name" : "Robbie Hatley", - "id" : "Robbie Hatley", "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Robert Ransbottom", - "data" : [ - [ - "Raku", - 2 ] ], - "id" : "Robert Ransbottom" - }, - { - "id" : "Roger Bell_West", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Roger Bell_West" - }, - { - "id" : "Simon Green", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Simon Green" + "id" : "Peter Meszaros", + "name" : "Peter Meszaros" }, { "data" : [ @@ -655,7 +217,6 @@ "name" : "Thomas Kohler" }, { - "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -666,10 +227,11 @@ 2 ] ], + "id" : "Ulrich Rieke", "name" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -680,32 +242,18 @@ 1 ] ], - "id" : "W. Luis Mochan" + "name" : "W. Luis Mochan" } ] }, - "subtitle" : { - "text" : "[Champions: 37] Last updated at 2023-11-27 05:34:15 GMT" - }, - "title" : { - "text" : "The Weekly Challenge - 244" - }, - "tooltip" : { - "headerFormat" : "{series.name}
", - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
" - }, "xAxis" : { "type" : "category" }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } + "title" : { + "text" : "The Weekly Challenge - 245" + }, + "subtitle" : { + "text" : "[Champions: 13] Last updated at 2023-11-28 11:50:08 GMT" }, "yAxis" : { "title" : { diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index b28fa67db9..95c3935250 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,63 +1,63 @@ { - "chart" : { - "type" : "column" + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" + }, + "subtitle" : { + "text" : "Last updated at 2023-11-28 11:50:08 GMT" + }, + "xAxis" : { + "type" : "category", + "labels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + } + } + }, + "legend" : { + "enabled" : "false" + }, + "tooltip" : { + "pointFormat" : "{point.y:.0f}" }, "series" : [ { "name" : "Contributions", "dataLabels" : { - "rotation" : -90, - "y" : 10, "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, - "enabled" : "true", + "color" : "#FFFFFF", + "y" : 10, "format" : "{point.y:.0f}", "align" : "right", - "color" : "#FFFFFF" + "rotation" : -90, + "enabled" : "true" }, "data" : [ [ "Blog", - 4235 + 4248 ], [ "Perl", - 12620 + 12639 ], [ "Raku", - 7281 + 7289 ] ] } ], - "legend" : { - "enabled" : "false" - }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } - }, - "xAxis" : { - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - }, - "type" : "category" - }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" - }, - "subtitle" : { - "text" : "Last updated at 2023-11-27 05:34:15 GMT" + "chart" : { + "type" : "column" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 1037014bf4..25cd77471d 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,26 +1,12 @@ { - "tooltip" : { - "headerFormat" : "", - "followPointer" : "true", - "pointFormat" : "Challenge {point.name}: {point.y:f}
" - }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2023-11-27 05:34:15 GMT" + "xAxis" : { + "type" : "category" }, "title" : { "text" : "The Weekly Challenge Language" }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "xAxis" : { - "type" : "category" + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2023-11-28 11:50:08 GMT" }, "yAxis" : { "title" : { @@ -29,6 +15,7 @@ }, "series" : [ { + "colorByPoint" : "true", "data" : [ { "name" : "#001", @@ -42,48 +29,48 @@ }, { "drilldown" : "003", - "y" : 87, - "name" : "#003" + "name" : "#003", + "y" : 87 }, { - "name" : "#004", "drilldown" : "004", - "y" : 103 + "y" : 103, + "name" : "#004" }, { - "y" : 80, "drilldown" : "005", + "y" : 80, "name" : "#005" }, { "name" : "#006", - "drilldown" : "006", - "y" : 61 + "y" : 61, + "drilldown" : "006" }, { - "name" : "#007", "drilldown" : "007", - "y" : 69 + "y" : 69, + "name" : "#007" }, { - "drilldown" : "008", "y" : 82, - "name" : "#008" + "name" : "#008", + "drilldown" : "008" }, { - "drilldown" : "009", + "name" : "#009", "y" : 80, - "name" : "#009" + "drilldown" : "009" }, { + "drilldown" : "010", "name" : "#010", - "y" : 69, - "drilldown" : "010" + "y" : 69 }, { "drilldown" : "011", - "y" : 89, - "name" : "#011" + "name" : "#011", + "y" : 89 }, { "drilldown" : "012", @@ -91,8 +78,8 @@ "name" : "#012" }, { - "y" : 87, "drilldown" : "013", + "y" : 87, "name" : "#013" }, { @@ -101,74 +88,74 @@ "drilldown" : "014" }, { - "name" : "#015", "drilldown" : "015", - "y" : 101 + "y" : 101, + "name" : "#015" }, { - "name" : "#016", +