From d3cd6c8a7072e6f3566176284074c04501bfe8e3 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 2 Jul 2024 13:19:01 +0100 Subject: - Added solutions by Eric Cheung. - Added solutions by Ulrich Rieke. - Added solutions by Roger Bell_West. - Added solutions by Robbie Hatley. - Added solutions by Simon Green. - Added solutions by Thomas Kohler. - Added solutions by Steven Wilson. - Added solutions by Mark Anderson. - Added solutions by PokGoPun. - Added solutions by W. Luis Mochan. - Added solutions by David Ferrone. - Added solutions by Peter Campbell Smith. - Added solutions by E. Choroba. - Added solutions by Ryan Thompson. - Added solutions by Matthew Neleigh. - Added solutions by Dave Jacoby. - Added solutions by Feng Chang. - Added solutions by Joelle Maslak. - Added solutions by Niels van Dijke. - Added solutions by Mariano Ortega. --- challenge-276/eric-cheung/python/ch-1.py | 12 + challenge-276/eric-cheung/python/ch-2.py | 9 + challenge-276/mgo1977/perl/ch-1.pl | 74 + challenge-276/mgo1977/perl/ch-2.pl | 74 + challenge-276/mgo1977/perl/ch1.pl | 74 - challenge-276/mgo1977/perl/ch2.pl | 74 - challenge-276/perlboy1967/perl/ch-1.pl | 39 + challenge-276/perlboy1967/perl/ch-2.pl | 38 + challenge-276/perlboy1967/perl/ch1.pl | 39 - challenge-276/perlboy1967/perl/ch2.pl | 38 - challenge-276/ulrich-rieke/cpp/ch-1.cpp | 21 + challenge-276/ulrich-rieke/cpp/ch-2.cpp | 29 + challenge-276/ulrich-rieke/haskell/ch-1.hs | 18 + challenge-276/ulrich-rieke/haskell/ch-2.hs | 19 + challenge-276/ulrich-rieke/perl/ch-1.pl | 18 + challenge-276/ulrich-rieke/perl/ch-2.pl | 17 + challenge-276/ulrich-rieke/raku/ch-1.raku | 6 + challenge-276/ulrich-rieke/raku/ch-2.raku | 14 + challenge-276/ulrich-rieke/rust/ch-1.rs | 15 + challenge-276/ulrich-rieke/rust/ch-2.rs | 23 + members.json | 1 + stats/pwc-challenge-275.json | 638 +++++ stats/pwc-current.json | 479 +--- stats/pwc-language-breakdown-summary.json | 66 +- stats/pwc-language-breakdown.json | 3677 ++++++++++++++-------------- stats/pwc-leaders.json | 496 ++-- stats/pwc-summary-1-30.json | 34 +- stats/pwc-summary-121-150.json | 106 +- stats/pwc-summary-151-180.json | 60 +- stats/pwc-summary-181-210.json | 122 +- stats/pwc-summary-211-240.json | 98 +- stats/pwc-summary-241-270.json | 122 +- stats/pwc-summary-271-300.json | 60 +- stats/pwc-summary-301-330.json | 78 +- stats/pwc-summary-31-60.json | 42 +- stats/pwc-summary-61-90.json | 42 +- stats/pwc-summary-91-120.json | 118 +- stats/pwc-summary.json | 702 +++--- 38 files changed, 4082 insertions(+), 3510 deletions(-) create mode 100755 challenge-276/eric-cheung/python/ch-1.py create mode 100755 challenge-276/eric-cheung/python/ch-2.py create mode 100644 challenge-276/mgo1977/perl/ch-1.pl create mode 100644 challenge-276/mgo1977/perl/ch-2.pl delete mode 100644 challenge-276/mgo1977/perl/ch1.pl delete mode 100644 challenge-276/mgo1977/perl/ch2.pl create mode 100755 challenge-276/perlboy1967/perl/ch-1.pl create mode 100755 challenge-276/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-276/perlboy1967/perl/ch1.pl delete mode 100755 challenge-276/perlboy1967/perl/ch2.pl create mode 100755 challenge-276/ulrich-rieke/cpp/ch-1.cpp create mode 100755 challenge-276/ulrich-rieke/cpp/ch-2.cpp create mode 100755 challenge-276/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-276/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-276/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-276/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-276/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-276/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-276/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-276/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-275.json diff --git a/challenge-276/eric-cheung/python/ch-1.py b/challenge-276/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..abb3112347 --- /dev/null +++ b/challenge-276/eric-cheung/python/ch-1.py @@ -0,0 +1,12 @@ + +from itertools import combinations + +## arrHours = [12, 12, 30, 24, 24] ## Example 1 +## arrHours = [72, 48, 24, 5] ## Example 2 +arrHours = [12, 18, 24] ## Example 3 + +arrComb = combinations(arrHours, 2) + +arrOutput = [arrLoop for arrLoop in list(arrComb) if sum(arrLoop) % 24 == 0] + +print (len(arrOutput)) diff --git a/challenge-276/eric-cheung/python/ch-2.py b/challenge-276/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..1f41b77181 --- /dev/null +++ b/challenge-276/eric-cheung/python/ch-2.py @@ -0,0 +1,9 @@ + +## arrInt = [1, 2, 2, 4, 1, 5] ## Example 1 +arrInt = [1, 2, 3, 4, 5] ## Example 2 + +arrFreq = [arrInt.count(nLoop) for nLoop in set(arrInt)] + +nMaxFreq = max(arrFreq) + +print (nMaxFreq * arrFreq.count(nMaxFreq)) diff --git a/challenge-276/mgo1977/perl/ch-1.pl b/challenge-276/mgo1977/perl/ch-1.pl new file mode 100644 index 0000000000..7fbb808b0b --- /dev/null +++ b/challenge-276/mgo1977/perl/ch-1.pl @@ -0,0 +1,74 @@ +#!/bin/perl -w + +# You are given an array of integers, @hours. +# Write a script to return the number of pairs that forms a complete day. +# A complete day is defined as a time duration that is an exact multiple of 24 hours. + +# Example 1 +# Input: @hours = (12, 12, 30, 24, 24) +# Output: 2 +# +# Pair 1: (12, 12) +# Pair 2: (24, 24) + +# Example 2 +# Input: @hours = (72, 48, 24, 5) +# Output: 3 + +# Pair 1: (72, 48) +# Pair 2: (72, 24) +# Pair 3: (48, 24) + +# Example 3 +# Input: @hours = (12, 18, 24) +# Output: 0 + +testMe(\&process, 'Example1', [12, 12, 30, 24, 24], 2); +testMe(\&process, 'Example2', [72, 48, 24, 5], 3); +testMe(\&process, 'Example3', [12, 18, 24], 0); + +sub testMe { + my $processor = shift; + my $name = shift; + my $input = shift; + my $expectedValue = shift; + + my $got = &$processor(@$input); + + if ( $got==$expectedValue ) { + print "[OK ] $name\n"; + } + else { + print "[ERR] $name :: got=$got, expectedValue=$expectedValue\n"; + } + +} + + +sub process { + my @input = @_; + + my $len = @input; + + my $numberOfPairs = 0; + + for(my $i=0; $i < $len; ++$i) { + + my $v1 = $input[$i]; + + for(my $j=$i+1; $j < $len; ++$j) { + + my $v2 = $input[$j]; + + if ( ($v1+$v2)%24==0 ) { + ++$numberOfPairs; + } + + } + + } + + return $numberOfPairs; +} + + diff --git a/challenge-276/mgo1977/perl/ch-2.pl b/challenge-276/mgo1977/perl/ch-2.pl new file mode 100644 index 0000000000..136f80de1a --- /dev/null +++ b/challenge-276/mgo1977/perl/ch-2.pl @@ -0,0 +1,74 @@ +#!/bin/perl -w + +use feature 'signatures'; + +# You are given an array of positive integers, @ints. +# Write a script to return the total number of elements in the given array which have the highest frequency. + +# Example 1 +# Input: @ints = (1, 2, 2, 4, 1, 5) +# Ouput: 4 + +# The maximum frequency is 2. +# The elements 1 and 2 has the maximum frequency. + + +# Example 2 +# Input: @ints = (1, 2, 3, 4, 5) +# Ouput: 5 + +# The maximum frequency is 1. +# The elements 1, 2, 3, 4 and 5 has the maximum frequency. + + +testMe(\&process, 'Example1', [1, 2, 2, 4, 1, 5], 4); +testMe(\&process, 'Example2', [1, 2, 3, 4, 5], 5); +testMe(\&process, 'Example3', [1, 2, 2, 3, 2, 4, 6, 5, 5], 3); + +sub testMe { + my $processor = shift; + my $name = shift; + my $input = shift; + my $expectedValue = shift; + + my $got = &$processor(@$input); + + if ( $got==$expectedValue ) { + print "[OK ] $name\n"; + } + else { + print "[ERR] $name :: got=$got, expectedValue=$expectedValue\n"; + } + +} + +sub process { + my @input = @_; + + my $len = @input; + + my $result = 0; + + my $map = {}; + + for(my $i=0; $i < $len; ++$i) { + $map->{$input[$i]}++; + } + + my $maxValue = (sort { $b <=> $a } values %$map)[0]; + + foreach my $key (@input) { + + my $value = $map->{$key}; + + if ( $value == $maxValue ) { + ++$result; + } + + } + + return $result; +} + + + diff --git a/challenge-276/mgo1977/perl/ch1.pl b/challenge-276/mgo1977/perl/ch1.pl deleted file mode 100644 index 7fbb808b0b..0000000000 --- a/challenge-276/mgo1977/perl/ch1.pl +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/perl -w - -# You are given an array of integers, @hours. -# Write a script to return the number of pairs that forms a complete day. -# A complete day is defined as a time duration that is an exact multiple of 24 hours. - -# Example 1 -# Input: @hours = (12, 12, 30, 24, 24) -# Output: 2 -# -# Pair 1: (12, 12) -# Pair 2: (24, 24) - -# Example 2 -# Input: @hours = (72, 48, 24, 5) -# Output: 3 - -# Pair 1: (72, 48) -# Pair 2: (72, 24) -# Pair 3: (48, 24) - -# Example 3 -# Input: @hours = (12, 18, 24) -# Output: 0 - -testMe(\&process, 'Example1', [12, 12, 30, 24, 24], 2); -testMe(\&process, 'Example2', [72, 48, 24, 5], 3); -testMe(\&process, 'Example3', [12, 18, 24], 0); - -sub testMe { - my $processor = shift; - my $name = shift; - my $input = shift; - my $expectedValue = shift; - - my $got = &$processor(@$input); - - if ( $got==$expectedValue ) { - print "[OK ] $name\n"; - } - else { - print "[ERR] $name :: got=$got, expectedValue=$expectedValue\n"; - } - -} - - -sub process { - my @input = @_; - - my $len = @input; - - my $numberOfPairs = 0; - - for(my $i=0; $i < $len; ++$i) { - - my $v1 = $input[$i]; - - for(my $j=$i+1; $j < $len; ++$j) { - - my $v2 = $input[$j]; - - if ( ($v1+$v2)%24==0 ) { - ++$numberOfPairs; - } - - } - - } - - return $numberOfPairs; -} - - diff --git a/challenge-276/mgo1977/perl/ch2.pl b/challenge-276/mgo1977/perl/ch2.pl deleted file mode 100644 index 136f80de1a..0000000000 --- a/challenge-276/mgo1977/perl/ch2.pl +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/perl -w - -use feature 'signatures'; - -# You are given an array of positive integers, @ints. -# Write a script to return the total number of elements in the given array which have the highest frequency. - -# Example 1 -# Input: @ints = (1, 2, 2, 4, 1, 5) -# Ouput: 4 - -# The maximum frequency is 2. -# The elements 1 and 2 has the maximum frequency. - - -# Example 2 -# Input: @ints = (1, 2, 3, 4, 5) -# Ouput: 5 - -# The maximum frequency is 1. -# The elements 1, 2, 3, 4 and 5 has the maximum frequency. - - -testMe(\&process, 'Example1', [1, 2, 2, 4, 1, 5], 4); -testMe(\&process, 'Example2', [1, 2, 3, 4, 5], 5); -testMe(\&process, 'Example3', [1, 2, 2, 3, 2, 4, 6, 5, 5], 3); - -sub testMe { - my $processor = shift; - my $name = shift; - my $input = shift; - my $expectedValue = shift; - - my $got = &$processor(@$input); - - if ( $got==$expectedValue ) { - print "[OK ] $name\n"; - } - else { - print "[ERR] $name :: got=$got, expectedValue=$expectedValue\n"; - } - -} - -sub process { - my @input = @_; - - my $len = @input; - - my $result = 0; - - my $map = {}; - - for(my $i=0; $i < $len; ++$i) { - $map->{$input[$i]}++; - } - - my $maxValue = (sort { $b <=> $a } values %$map)[0]; - - foreach my $key (@input) { - - my $value = $map->{$key}; - - if ( $value == $maxValue ) { - ++$result; - } - - } - - return $result; -} - - - diff --git a/challenge-276/perlboy1967/perl/ch-1.pl b/challenge-276/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..9ff82133f6 --- /dev/null +++ b/challenge-276/perlboy1967/perl/ch-1.pl @@ -0,0 +1,39 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 276 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-276 + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Complete Day +Submitted by: Mohammad Sajid Anwar + +You are given an array of integers, @hours. + +Write a script to return the number of pairs that forms a complete day. + +|| A complete day is defined as a time duration that is an exact multiple +|| of 24 hours. + +=cut + +use v5.32; +use feature qw(signatures); +use common::sense; + +use Test2::V0 qw(-no_srand); +use DDP; + +use Algorithm::Combinatorics qw(combinations); + +sub completeDay (@hours) { + grep { $_ % 24 == 0 } map { $$_[0] + $$_[1] } combinations(\@hours,2); +} + +is(completeDay(12,12,30,24,24),2); +is(completeDay(72,48,24,5),3); +is(completeDay(12,18,24),0); + +done_testing; diff --git a/challenge-276/perlboy1967/perl/ch-2.pl b/challenge-276/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..d19bebae7e --- /dev/null +++ b/challenge-276/perlboy1967/perl/ch-2.pl @@ -0,0 +1,38 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 276 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-276 + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Maximum Frequency +Submitted by: Mohammad Sajid Anwar + +You are given an array of positive integers, @ints. + +Write a script to return the total number of elements in the given +array which have the highest frequency. + +=cut + +use v5.32; +use feature qw(signatures); +use common::sense; + +use Test2::V0 qw(-no_srand); + +use List::AllUtils qw(sum0); + +sub maximumFrequency (@ints) { + my ($m,%f) = (0); + map {$f{$_}++; $m++ if $f{$_} > $m} @ints; + $m * scalar grep { $_ == $m } values %f; +} + +is(maximumFrequency(1,2,2,4,1,5),4); +is(maximumFrequency(1,2,3,4,5),5); +is(maximumFrequency(1,1,3,3,5,5,7),6); + +done_testing; diff --git a/challenge-276/perlboy1967/perl/ch1.pl b/challenge-276/perlboy1967/perl/ch1.pl deleted file mode 100755 index 9ff82133f6..0000000000 --- a/challenge-276/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 276 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-276 - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Complete Day -Submitted by: Mohammad Sajid Anwar - -You are given an array of integers, @hours. - -Write a script to return the number of pairs that forms a complete day. - -|| A complete day is defined as a time duration that is an exact multiple -|| of 24 hours. - -=cut - -use v5.32; -use feature qw(signatures); -use common::sense; - -use Test2::V0 qw(-no_srand); -use DDP; - -use Algorithm::Combinatorics qw(combinations); - -sub completeDay (@hours) { - grep { $_ % 24 == 0 } map { $$_[0] + $$_[1] } combinations(\@hours,2); -} - -is(completeDay(12,12,30,24,24),2); -is(completeDay(72,48,24,5),3); -is(completeDay(12,18,24),0); - -done_testing; diff --git a/challenge-276/perlboy1967/perl/ch2.pl b/challenge-276/perlboy1967/perl/ch2.pl deleted file mode 100755 index d19bebae7e..0000000000 --- a/challenge-276/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 276 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-276 - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Maximum Frequency -Submitted by: Mohammad Sajid Anwar - -You are given an array of positive integers, @ints. - -Write a script to return the total number of elements in the given -array which have the highest frequency. - -=cut - -use v5.32; -use feature qw(signatures); -use common::sense; - -use Test2::V0 qw(-no_srand); - -use List::AllUtils qw(sum0); - -sub maximumFrequency (@ints) { - my ($m,%f) = (0); - map {$f{$_}++; $m++ if $f{$_} > $m} @ints; - $m * scalar grep { $_ == $m } values %f; -} - -is(maximumFrequency(1,2,2,4,1,5),4); -is(maximumFrequency(1,2,3,4,5),5); -is(maximumFrequency(1,1,3,3,5,5,7),6); - -done_testing; diff --git a/challenge-276/ulrich-rieke/cpp/ch-1.cpp b/challenge-276/ulrich-rieke/cpp/ch-1.cpp new file mode 100755 index 0000000000..2802cb5600 --- /dev/null +++ b/challenge-276/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,21 @@ +#include +#include +#include +#include +#include + +int main( ) { + std::cout << "Enter some positive integers , separated by blanks, 'e' to end!\n" ; + std::vector numbers { std::istream_iterator( std::cin ) , + std::istream_iterator( ) } ; + std::vector> combinations ; + int len = numbers.size( ) ; + for ( int i = 0 ; i < len - 1 ; i++ ) { + for ( int j = i + 1 ; j < len ; j++ ) { + combinations.push_back( std::make_pair( numbers[i] , numbers[j] ) ) ; + } + } + std::cout << std::count_if( combinations.begin( ) , combinations.end( ) , [] + ( const auto & p ) { return (p.first + p.second) % 24 == 0 ; } ) << '\n' ; + return 0 ; +} diff --git a/challenge-276/ulrich-rieke/cpp/ch-2.cpp b/challenge-276/ulrich-rieke/cpp/ch-2.cpp new file mode 100755 index 0000000000..a3c5d7e345 --- /dev/null +++ b/challenge-276/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,29 @@ +#include +#include +#include +#include + +int main( ) { + std::cout << "Enter some integers, separated by blanks, 'e' to end!\n" ; + std::vector numbers { std::istream_iterator( std::cin ) , + std::istream_iterator( ) } ; + std::map frequencies ; + for ( int i : numbers ) { + frequencies[i]++ ; + } + int elements = 0 ;//elements with maximum frequency + int maximum = 0 ;//maximum frequency + for ( auto p : frequencies ) { + if ( p.second > maximum ) + maximum = p.second ; + } + for ( auto p : frequencies ) { + if ( p.second == maximum ) + elements++ ; + } + //we want the product of maximum frequency and the number of elements that have it + std::cout << elements * maximum << '\n' ; + return 0 ; +} + + diff --git a/challenge-276/ulrich-rieke/haskell/ch-1.hs b/challenge-276/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..c133891922 --- /dev/null +++ b/challenge-276/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,18 @@ +module Challenge276 + where +import Data.List ( nub , (!!) ) + +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 ) ] + +solution :: [Int] -> Int +solution list = length $ filter (\subli -> mod ( sum subli ) 24 == 0 ) $ nub $ + combinations 2 list + +main :: IO ( ) +main = do + putStrLn "Enter some positive integers, separated by blanks!" + numberline <- getLine + print $ solution $ map read $ words numberline diff --git a/challenge-276/ulrich-rieke/haskell/ch-2.hs b/challenge-276/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..4c06361f5a --- /dev/null +++ b/challenge-276/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,19 @@ +module Challenge276_2 + where +import Data.List ( sort , sortOn , group ) + +solution :: [Int] -> Int +solution list = + let sorted = sort list + grouped = group sorted + groupedLengths = sortOn length grouped + maxLen = length $ last groupedLengths -- maximum frequency + howmany = length $ filter ( (== maxLen ) . length ) grouped --elements with + --maximum frequency + in howmany * maxLen --their product + +main :: IO ( ) +main = do + putStrLn "Enter some positive integers, separated by blanks!" + numberline <- getLine + print $ solution $ map read $ words numberline diff --git a/challenge-276/ulrich-rieke/perl/ch-1.pl b/challenge-276/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..9fb2cc7793 --- /dev/null +++ b/challenge-276/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use Algorithm::Combinatorics qw ( combinations ) ; + +say "Enter some positive integers , separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s+/ , $line ) ; +my $total = 0 ; +my $iter = combinations( \@numbers , 2 ) ; +while ( my $c = $iter->next ) { + if ( ($c->[0] + $c->[1]) % 24 == 0 ) { + $total++ ; + } +} +say $total ; diff --git a/challenge-276/ulrich-rieke/perl/ch-2.pl b/challenge-276/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..6278f6af18 --- /dev/null +++ b/challenge-276/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( max ) ; + +say "Enter some integers, separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s+/ , $line ) ; +my %frequencies ; +map { $frequencies{$_}++ } @numbers ; +my $maximum = max( values( %frequencies ) ) ; +my $maxElements = scalar( grep { $frequencies{ $_ } == $maximum } keys %frequencies ) ; +#what we are interested in is the product of maximum frequency and the number of element +#that are that frequent +say ( $maxElements * $maximum ) ; diff --git a/challenge-276/ulrich-rieke/raku/ch-1.raku b/challenge-276/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..5e250b40cc --- /dev/null +++ b/challenge-276/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,6 @@ +use v6 ; + +say "Enter some positive integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +say @numbers.combinations( 2 ).grep( { $_.sum %% 24 } ).elems ; diff --git a/challenge-276/ulrich-rieke/raku/ch-2.raku b/challenge-276/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..246fe012e1 --- /dev/null +++ b/challenge-276/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,14 @@ +use v6 ; + +say "Enter some integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my %frequencies ; +@numbers.map( {%frequencies{$_}++} ) ; +my $maximum = %frequencies.values.max ; +my @keys = %frequencies.keys ; +my $number = @keys.grep( {%frequencies{$_} == $maximum} ).elems ;#number of element +#with maximum frequency +#what we look for is the product of maximum frequency and the number of elements that +#have that maximum frequency! +say ( $number * $maximum ) ; diff --git a/challenge-276/ulrich-rieke/rust/ch-1.rs b/challenge-276/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..b743e9bc77 --- /dev/null +++ b/challenge-276/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,15 @@ +use std::io ; +use itertools::Itertools ; + +fn main() { + println!("Enter some positive integers, separated by blanks!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = inline.as_str( ).trim( ) ; + let numbers : Vec = entered_line.split_whitespace( ).map( | s | + s.parse::( ).unwrap( ) ).collect( ) ; + let solution = numbers.into_iter( ).combinations( 2 ).filter( | vec | { + (vec[0] + vec[1]) % 24 == 0 + } ).count( ) ; + println!("{}" , solution ) ; +} diff --git a/challenge-276/ulrich-rieke/rust/ch-2.rs b/challenge-276/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..f395f112a0 --- /dev/null +++ b/challenge-276/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,23 @@ +use std::io ; +use std::collections::HashMap ; + +fn main() { + println!("Enter some positive integers!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = inline.as_str( ).trim( ) ; + let numbers : Vec = entered_line.split_whitespace( ).map( | s | + s.parse::( ).unwrap( ) ).collect( ) ; + let mut frequencies : HashMap = HashMap::new( ) ; + for i in numbers { + frequencies.entry( i ).and_modify( |n| {*n += 1} ).or_insert( 1 ) ; + } + let max_freq : usize = *frequencies.values( ).max( ).unwrap( ) ; + let mut number : usize = 0 ; //how many numbers have maximum frequency ? + for (_ , v) in &frequencies { + if *v == max_freq { + number += 1 ; + } + } + println!("{}" , number * max_freq) ; +} diff --git a/members.json b/members.json index df615030f2..e1e03f3c4f 100644 --- a/members.json +++ b/members.json @@ -160,6 +160,7 @@ "luc65r" : "Lucas Ransan", "luiz-felipe" : "Luiz Felipe", "manfredi" : "Leo Manfredi", + "mgo1977" : "Mariano Ortega", "massa" : "Humberto Massa", "mauke" : "mauke", "miguel-prz" : "Miguel Prz", diff --git a/stats/pwc-challenge-275.json b/stats/pwc-challenge-275.json new file mode 100644 index 0000000000..7eb11235f3 --- /dev/null +++ b/stats/pwc-challenge-275.json @@ -0,0 +1,638 @@ +{ + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge - 275" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "series" : [ + { + "data" : [ + { + "y" : 2, + "name" : "Andrew Schneider", + "drilldown" : "Andrew Schneider" + }, + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" + }, + { + "name" : "BarrOff", + "y" : 1, + "drilldown" : "BarrOff" + }, + { + "drilldown" : "Bob Lied", + "name" : "Bob Lied", + "y" : 2 + }, + { + "drilldown" : "Bruce Gray", + "y" : 2, + "name" : "Bruce Gray" + }, + { + "name" : "Cheok-Yin Fung", + "y" : 2, + "drilldown" : "Cheok-Yin Fung" + }, + { + "y" : 2, + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby" + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "name" : "Feng Chang", + "y" : 2, + "drilldown" : "Feng Chang" + }, + { + "name" : "Jaldhar H. Vyas", + "y" : 5, + "drilldown" : "Jaldhar H. Vyas" + }, + { + "drilldown" : "Jan Krnavek", + "y" : 2, + "name" : "Jan Krnavek" + }, + { + "y" : 4, + "name" : "Joelle Maslak", + "drilldown" : "Joelle Maslak" + }, + { + "y" : 3, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "y" : 3 + }, + { + "y" : 11, + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" + }, + { + "y" : 2, + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini" + }, + { + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson", + "y" : 2 + }, + { + "name" : "Matthew Neleigh", + "y" : 2, + "drilldown" : "Matthew Neleigh" + }, + { + "drilldown" : "Matthias Muth", + "y" : 3, + "name" : "Matthias Muth" + }, + { + "drilldown" : "Nelo Tovar", + "y" : 2, + "name" : "Nelo Tovar" + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Packy Anderson", + "name" : "Packy Anderson", + "y" : 5 + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "drilldown" : "Peter Meszaros", + "y" : 2, + "name" : "Peter Meszaros" + }, + { + "name" : "Reinier Maliepaard", + "y" : 3, + "drilldown" : "Reinier Maliepaard" + }, + { + "y" : 3, + "name" : "Robbie Hatley", + "drilldown" : "Robbie Hatley" + }, + { + "y" : 1, + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom" + }, + { + "y" : 5, + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West" + }, + { + "drilldown" : "Simon Green", + "name" : "Simon Green", + "y" : 3 + }, + { + "y" : 4, + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler" + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + }, + { + "drilldown" : "Wanderdoc", + "name" : "Wanderdoc", + "y" : 2 + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 275" + } + ], + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, + "subtitle" : { + "text" : "[Champions: 34] Last updated at 2024-07-02 12:11:04 GMT" + }, + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : 0 + }, + "drilldown" : { + "series" : [ + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Andrew Schneider", + "name" : "Andrew Schneider" + }, + { + "id" : "Arne Sommer", + "name" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Athanasius", + "id" : "Athanasius" + }, + { + "id" : "BarrOff", + "name" : "BarrOff", + "data" : [ + [ + "Raku", + 1 + ] + ] + }, + { + "name" : "Bob Lied", + "id" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Bruce Gray", + "id" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Dave Jacoby", + "id" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "David Ferrone", + "name" : "David Ferrone" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Feng Chang", + "id" : "Feng Chang" + }, + { + "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Jan Krnavek", + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Joelle Maslak", + "name" : "Joelle Maslak", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 9 + ] + ], + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" + }, + { + "id" : "Mariano Spadaccini", + "name" : "Mariano Spadaccini", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Mark Anderson", + "name" : "Mark Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Matthew Neleigh", + "name" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "id" : "Matthias Muth", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Nelo Tovar", + "name" : "Nelo Tovar" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Niels van Dijke", + "name" : "Niels van Dijke" + }, + { + "name" : "Packy Anderson", + "id" : "Packy Anderson", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Peter Meszaros", + "id" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Reinier Maliepaard", + "name" : "Reinier Maliepaard" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Robbie Hatley", + "name" : "Robbie Hatley" + }, + { + "data" : [ + [ + "Raku", + 1 + ] + ], + "name" : "Robert Ransbottom", + "id" : "Robert Ransbottom" + }, + { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Simon Green", + "name" : "Simon Green" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Wanderdoc", + "id" : "Wanderdoc" + } + ] + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index e2550217e0..8fc1dceb0b 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -2,92 +2,14 @@ "drilldown" : { "series" : [ { - "id" : "Andrew Schneider", + "id" : "Dave Jacoby", "data" : [ [ "Perl", 2 ] ], - "name" : "Andrew Schneider" - }, - { - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Arne Sommer", - "id" : "Arne Sommer" - }, - { - "name" : "Athanasius", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "Athanasius" - }, - { - "name" : "BarrOff", - "data" : [ - [ - "Raku", - 1 - ] - ], - "id" : "BarrOff" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Bob Lied", - "id" : "Bob Lied" - }, - { - "data" : [ - [ - "Raku", - 2 - ] - ], - "name" : "Bruce Gray", - "id" : "Bruce Gray" - }, - { - "name" : "Cheok-Yin Fung", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Cheok-Yin Fung" - }, - { - "name" : "Dave Jacoby", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Dave Jacoby" + "name" : "Dave Jacoby" }, { "id" : "David Ferrone", @@ -100,14 +22,14 @@ ] }, { - "id" : "E. Choroba", "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "E. Choroba" }, { "data" : [ @@ -120,34 +42,7 @@ "id" : "Feng Chang" }, { - "name" : "Jaldhar H. Vyas", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Jaldhar H. Vyas" - }, - { - "id" : "Jan Krnavek", - "name" : "Jan Krnavek", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { + "name" : "Joelle Maslak", "data" : [ [ "Perl", @@ -158,136 +53,47 @@ 2 ] ], - "name" : "Joelle Maslak", "id" : "Joelle Maslak" }, { - "name" : "Jorg Sommrey", + "id" : "Mariano Ortega", "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Jorg Sommrey" - }, - { - "name" : "Laurent Rosenfeld", - "data" : [ - [ - "Perl", - 1 - ], - [ - "Raku", - 1 - ], - [ - "Blog", - 1 ] ], - "id" : "Laurent Rosenfeld" + "name" : "Mariano Ortega" }, { "data" : [ [ "Raku", 2 - ], - [ - "Blog", - 9 ] ], - "name" : "Luca Ferrari", - "id" : "Luca Ferrari" - }, - { - "id" : "Mariano Spadaccini", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Mariano Spadaccini" - }, - { "name" : "Mark Anderson", - "data" : [ - [ - "Raku", - 2 - ] - ], "id" : "Mark Anderson" }, { "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ] - }, - { - "id" : "Matthias Muth", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] ], - "name" : "Matthias Muth" - }, - { - "name" : "Nelo Tovar", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Nelo Tovar" + "name" : "Matthew Neleigh" }, { "id" : "Niels van Dijke", + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "name" : "Niels van Dijke" - }, - { - "id" : "Packy Anderson", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Packy Anderson" + ] }, { "id" : "Peter Campbell Smith", @@ -304,17 +110,8 @@ "name" : "Peter Campbell Smith" }, { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Peter Meszaros", - "id" : "Peter Meszaros" - }, - { - "id" : "Reinier Maliepaard", + "id" : "Robbie Hatley", + "name" : "Robbie Hatley", "data" : [ [ "Perl", @@ -324,50 +121,35 @@ "Blog", 1 ] - ], - "name" : "Reinier Maliepaard" + ] }, { - "id" : "Robbie Hatley", - "name" : "Robbie Hatley", + "id" : "Roger Bell_West", "data" : [ [ "Perl", 2 ], - [ - "Blog", - 1 - ] - ] - }, - { - "data" : [ [ "Raku", - 1 + 2 ] ], - "name" : "Robert Ransbottom", - "id" : "Robert Ransbottom" + "name" : "Roger Bell_West" }, { - "id" : "Roger Bell_West", + "id" : "Ryan Thompson", "data" : [ [ "Perl", 2 ], - [ - "Raku", - 2 - ], [ "Blog", 1 ] ], - "name" : "Roger Bell_West" + "name" : "Ryan Thompson" }, { "id" : "Simon Green", @@ -398,28 +180,32 @@ "id" : "Thomas Kohler" }, { + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke", "data" : [ [ "Perl", 2 ], [ - "Blog", - 1 + "Raku", + 2 ] - ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + ] }, { - "name" : "Wanderdoc", "data" : [ [ "Perl", 2 + ], + [ + "Blog", + 1 ] ], - "id" : "Wanderdoc" + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan" } ] }, @@ -428,101 +214,67 @@ "text" : "Total Solutions" } }, + "title" : { + "text" : "The Weekly Challenge - 276" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : 0 + }, + "tooltip" : { + "followPointer" : 1, + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" + }, "xAxis" : { "type" : "category" }, + "subtitle" : { + "text" : "[Champions: 17] Last updated at 2024-07-02 12:13:56 GMT" + }, "series" : [ { "data" : [ { - "drilldown" : "Andrew Schneider", - "name" : "Andrew Schneider", - "y" : 2 - }, - { - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer", - "y" : 3 - }, - { - "y" : 4, - "name" : "Athanasius", - "drilldown" : "Athanasius" - }, - { - "y" : 1, - "name" : "BarrOff", - "drilldown" : "BarrOff" - }, - { - "y" : 2, - "name" : "Bob Lied", - "drilldown" : "Bob Lied" - }, - { - "y" : 2, - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray" - }, - { - "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung", - "y" : 2 - }, - { - "drilldown" : "Dave Jacoby", "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby", "y" : 2 }, { - "name" : "David Ferrone", + "y" : 2, "drilldown" : "David Ferrone", - "y" : 2 + "name" : "David Ferrone" }, { - "y" : 2, + "name" : "E. Choroba", "drilldown" : "E. Choroba", - "name" : "E. Choroba" - }, - { - "y" : 2, - "name" : "Feng Chang", - "drilldown" : "Feng Chang" - }, - { - "y" : 5, - "drilldown" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" + "y" : 2 }, { "y" : 2, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" + "drilldown" : "Feng Chang", + "name" : "Feng Chang" }, { - "y" : 4, + "name" : "Joelle Maslak", "drilldown" : "Joelle Maslak", - "name" : "Joelle Maslak" - }, - { - "y" : 3, - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey" - }, - { - "y" : 3, - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld" - }, - { - "y" : 11, - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari" + "y" : 4 }, { + "name" : "Mariano Ortega", "y" : 2, - "name" : "Mariano Spadaccini", - "drilldown" : "Mariano Spadaccini" + "drilldown" : "Mariano Ortega" }, { "y" : 2, @@ -530,59 +282,34 @@ "name" : "Mark Anderson" }, { - "y" : 2, "drilldown" : "Matthew Neleigh", - "name" : "Matthew Neleigh" - }, - { - "y" : 3, - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth" - }, - { "y" : 2, - "name" : "Nelo Tovar", - "drilldown" : "Nelo Tovar" + "name" : "Matthew Neleigh" }, { - "name" : "Niels van Dijke", "drilldown" : "Niels van Dijke", - "y" : 2 - }, - { - "drilldown" : "Packy Anderson", - "name" : "Packy Anderson", - "y" : 5 - }, - { - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", - "y" : 3 - }, - { "y" : 2, - "name" : "Peter Meszaros", - "drilldown" : "Peter Meszaros" + "name" : "Niels van Dijke" }, { - "name" : "Reinier Maliepaard", - "drilldown" : "Reinier Maliepaard", - "y" : 3 + "name" : "Peter Campbell Smith", + "y" : 3, + "drilldown" : "Peter Campbell Smith" }, { "name" : "Robbie Hatley", - "drilldown" : "Robbie Hatley", - "y" : 3 + "y" : 3, + "drilldown" : "Robbie Hatley" }, { - "y" : 1, - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom" + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", + "y" : 4 }, { - "y" : 5, - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West" + "y" : 3, + "drilldown" : "Ryan Thompson", + "name" : "Ryan Thompson" }, { "name" : "Simon Green", @@ -591,48 +318,22 @@ }, { "name" : "Thomas Kohler", - "drilldown" : "Thomas Kohler", - "y" : 4 + "y" : 4, + "drilldown" : "Thomas Kohler" }, { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke", + "y" : 4 }, { - "y" : 2, - "name" : "Wanderdoc", - "drilldown" : "Wanderdoc" + "drilldown" : "W. Luis Mochan", + "y" : 3, + "name" : "W. Luis Mochan" } ], - "name" : "The Weekly Challenge - 275", - "colorByPoint" : 1 + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 276" } - ], - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
", - "followPointer" : 1 - }, - "subtitle" : { - "text" : "[Champions: 34] Last updated at 2024-06-30 23:39:23 GMT" - }, - "chart" : { - "type" : "column" - }, - "title" : { - "text" : "The Weekly Challenge - 275" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "legend" : { - "enabled" : 0 - } + ] } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index ab8cb043fe..b85ea174b1 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,47 +1,56 @@ { - "legend" : { - "enabled" : "false" - }, - "subtitle" : { - "text" : "Last updated at 2024-06-30 23:39:23 GMT" - }, - "chart" : { - "type" : "column" + "xAxis" : { + "labels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + } + }, + "type" : "category" }, "series" : [ { - "dataLabels" : { - "align" : "right", - "rotation" : -90, - "y" : 10, - "format" : "{point.y:.0f}", - "color" : "#FFFFFF", - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "enabled" : "true" - }, "name" : "Contributions", "data" : [ [ "Blog", - 5010 + 5017 ], [ "Perl", - 14258 + 14288 ], [ "Raku", - 8266 + 8276 ] - ] + ], + "dataLabels" : { + "y" : 10, + "enabled" : "true", + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "align" : "right", + "color" : "#FFFFFF", + "rotation" : -90, + "format" : "{point.y:.0f}" + } } ], + "subtitle" : { + "text" : "Last updated at 2024-07-02 12:13:56 GMT" + }, "tooltip" : { "pointFormat" : "{point.y:.0f}" }, + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : "false" + }, "title" : { "text" : "The Weekly Challenge Contributions [2019 - 2024]" }, @@ -50,14 +59,5 @@ "text" : null }, "min" : 0 - }, - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index b393311c07..952ee5b2fb 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,1413 +1,20 @@ { - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2024-06-30 23:39:23 GMT" + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } }, - "chart" : { - "type" : "column" - }, - "series" : [ - { - "colorByPoint" : "true", - "name" : "The Weekly Challenge Languages", - "data" : [ - { - "name" : "#001", - "drilldown" : "001", - "y" : 168 - }, - { - "y" : 133, - "drilldown" : "002", - "name" : "#002" - }, - { - "name" : "#003", - "drilldown" : "003", - "y" : 91 - }, - { - "y" : 106, - "drilldown" : "004", - "name" : "#004" - }, - { - "y" : 82, - "drilldown" : "005", - "name" : "#005" - }, - { - "y" : 63, - "name" : "#006", - "drilldown" : "006" - }, - { - "y" : 71, - "name" : "#007", - "drilldown" : "007" - }, - { - "drilldown" : "008", - "name" : "#008", - "y" : 84 - }, - { - "name" : "#009", - "drilldown" : "009", - "y" : 82 - }, - { - "y" : 71, - "drilldown" : "010", - "name" : "#010" - }, - { - "drilldown" : "011", - "name" : "#011", - "y" : 91 - }, - { - "drilldown" : "012", - "name" : "#012", - "y" : 96 - }, - { - "y" : 88, - "drilldown" : "013", - "name" : "#013" - }, - { - "y" : 104, - "drilldown" : "014", - "name" : "#014" - }, - { - "y" : 103, - "drilldown" : "015", - "name" : "#015" - }, - { - "drilldown" : "016", - "name" : "#016", - "y" : 75 - }, - { - "y" : 87, - "name" : "#017", - "drilldown" : "017" - }, - { - "name" : "#018", - "drilldown" : "018", - "y" : 84 - }, - { - "y" : 105, - "drilldown" : "019", - "name" : "#019" - }, - { - "name" : "#020", - "drilldown" : "020", - "y" : 103 - }, - { - "name" : "#021", - "drilldown" : "021", - "y" : 74 - }, - { - "name" : "#022", - "drilldown" : "022", - "y" : 72 - }, - { - "name" : "#023", - "drilldown" : "023", - "y" : 101 - }, - { - "y" : 77, - "name" : "#024", - "drilldown" : "024" - }, - { - "drilldown" : "025", - "name" : "#025", - "y" : 62 - }, - { - "name" : "#026", - "drilldown" : "026", - "y" : 76 - }, - { - "y" : 64, - "drilldown" : "027", - "name" : "#027" - }, - { - "y" : 82, - "name" : "#028", - "drilldown" : "028" - }, - { - "name" : "#029", - "drilldown" : "029", - "y" : 83 - }, - { - "drilldown" : "030", - "name" : "#030", - "y" : 121 - }, - { - "drilldown" : "031", - "name" : "#031", - "y" : 93 - }, - { - "y" : 98, - "drilldown" : "032", - "name" : "#032" - }, - { - "name" : "#033", - "drilldown" : "033", - "y" : 114 - }, - { - "name" : "#034", - "drilldown" : "034", - "y" : 70 - }, - { - "drilldown" : "035", - "name" : "#035", - "y" : 68 - }, - { - "y" : 70, - "drilldown" : "036", - "name" : "#036" - }, - { - "name" : "#037", - "drilldown" : "037", - "y" : 70 - }, -