From 857d573334deaa24866cb695f1e3758a85c0b9d9 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 16 Jan 2024 20:21:31 +0000 Subject: - Added solutions by Eric Cheung. - Added solutions by Ulrich Rieke. - Added solutions by Laurent Rosenfeld. - Added solutions by PokGoPun. - Added solutions by Simon Proctor. - Added solutions by Niels van Dijke. - Added solutions by Mark Anderson. - Added solutions by E. Choroba. - Added solutions by Cheok-Yin Fung. - Added solutions by Peter Campbell Smith. - Added solutions by W. Luis Mochan. - Added solutions by Peter Meszaros. - Added solutions by Thomas Kohler. - Added solutions by David Ferrone. - Added solutions by Luca Ferrari. - Added solutions by Roger Bell_West. - Added solutions by Steven Wilson. - Added solutions by Matthew Neleigh. - Added solutions by Paulo Custodio. --- challenge-252/eric-cheung/python/ch-1.py | 6 + challenge-252/eric-cheung/python/ch-2.py | 10 + challenge-252/laurent-rosenfeld/blog.txt | 1 + challenge-252/laurent-rosenfeld/blog1.txt | 1 + challenge-252/laurent-rosenfeld/perl/ch-1.pl | 18 + challenge-252/laurent-rosenfeld/perl/ch-2.pl | 16 + challenge-252/laurent-rosenfeld/raku/ch-1.raku | 13 + challenge-252/laurent-rosenfeld/raku/ch-2.raku | 11 + challenge-252/perlboy1967/perl/ch-1.pl | 38 + challenge-252/perlboy1967/perl/ch-2.pl | 40 + challenge-252/perlboy1967/perl/ch1.pl | 38 - challenge-252/perlboy1967/perl/ch2.pl | 40 - challenge-252/steven-wilson/python/ch-01.py | 23 - challenge-252/steven-wilson/python/ch-1.py | 23 + challenge-252/ulrich-rieke/cpp/ch-1.cpp | 18 + challenge-252/ulrich-rieke/cpp/ch-2.cpp | 33 + challenge-252/ulrich-rieke/haskell/ch-1.hs | 9 + challenge-252/ulrich-rieke/haskell/ch-2.hs | 10 + challenge-252/ulrich-rieke/perl/ch-1.pl | 17 + challenge-252/ulrich-rieke/perl/ch-2.pl | 29 + challenge-252/ulrich-rieke/raku/ch-1.raku | 13 + challenge-252/ulrich-rieke/raku/ch-2.raku | 24 + challenge-252/ulrich-rieke/rust/ch-1.rs | 18 + challenge-252/ulrich-rieke/rust/ch-2.rs | 28 + stats/pwc-challenge-246.json | 475 ++-- stats/pwc-challenge-250.json | 525 ++-- stats/pwc-challenge-251.json | 661 +++++ stats/pwc-current.json | 478 +--- stats/pwc-language-breakdown-summary.json | 92 +- stats/pwc-language-breakdown.json | 3429 ++++++++++++------------ stats/pwc-leaders.json | 518 ++-- stats/pwc-summary-1-30.json | 42 +- stats/pwc-summary-121-150.json | 110 +- stats/pwc-summary-151-180.json | 58 +- stats/pwc-summary-181-210.json | 48 +- stats/pwc-summary-211-240.json | 108 +- stats/pwc-summary-241-270.json | 98 +- stats/pwc-summary-271-300.json | 122 +- stats/pwc-summary-301-330.json | 68 +- stats/pwc-summary-31-60.json | 98 +- stats/pwc-summary-61-90.json | 46 +- stats/pwc-summary-91-120.json | 106 +- stats/pwc-summary.json | 1900 ++++++------- 43 files changed, 5061 insertions(+), 4398 deletions(-) create mode 100755 challenge-252/eric-cheung/python/ch-1.py create mode 100755 challenge-252/eric-cheung/python/ch-2.py create mode 100644 challenge-252/laurent-rosenfeld/blog.txt create mode 100644 challenge-252/laurent-rosenfeld/blog1.txt create mode 100644 challenge-252/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-252/laurent-rosenfeld/perl/ch-2.pl create mode 100644 challenge-252/laurent-rosenfeld/raku/ch-1.raku create mode 100644 challenge-252/laurent-rosenfeld/raku/ch-2.raku create mode 100755 challenge-252/perlboy1967/perl/ch-1.pl create mode 100755 challenge-252/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-252/perlboy1967/perl/ch1.pl delete mode 100755 challenge-252/perlboy1967/perl/ch2.pl delete mode 100644 challenge-252/steven-wilson/python/ch-01.py create mode 100644 challenge-252/steven-wilson/python/ch-1.py create mode 100755 challenge-252/ulrich-rieke/cpp/ch-1.cpp create mode 100755 challenge-252/ulrich-rieke/cpp/ch-2.cpp create mode 100755 challenge-252/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-252/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-252/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-252/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-252/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-252/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-252/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-252/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-251.json diff --git a/challenge-252/eric-cheung/python/ch-1.py b/challenge-252/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..73003ac315 --- /dev/null +++ b/challenge-252/eric-cheung/python/ch-1.py @@ -0,0 +1,6 @@ + +## arrInt = [1, 2, 3, 4] ## Example 1 +arrInt = [2, 7, 1, 19, 18, 3] ## Example 2 + +arrOutput = [arrInt[nIndx] * arrInt[nIndx] for nIndx in range(len(arrInt)) if len(arrInt) % (nIndx + 1) == 0] +print (sum(arrOutput)) diff --git a/challenge-252/eric-cheung/python/ch-2.py b/challenge-252/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..e943434336 --- /dev/null +++ b/challenge-252/eric-cheung/python/ch-2.py @@ -0,0 +1,10 @@ + +## nInput = 5 ## Example 1 +## nInput = 3 ## Example 2 +## nInput = 1 ## Example 3 +nInput = 4 ## Example 4 + +nMax = int(nInput / 2 if nInput % 2 == 0 else (nInput - 1) / 2) +arrOutput = [nLoop for nLoop in range(-nMax, nMax + 1) if nLoop != 0 or nInput % 2 == 1] + +print (arrOutput) diff --git a/challenge-252/laurent-rosenfeld/blog.txt b/challenge-252/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..30145fad3c --- /dev/null +++ b/challenge-252/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2024/01/perl-weekly-challenge-252-special-numbers.html diff --git a/challenge-252/laurent-rosenfeld/blog1.txt b/challenge-252/laurent-rosenfeld/blog1.txt new file mode 100644 index 0000000000..f123a9e23d --- /dev/null +++ b/challenge-252/laurent-rosenfeld/blog1.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2024/01/perl-weekly-challenge-252-unique-sum-zero.html diff --git a/challenge-252/laurent-rosenfeld/perl/ch-1.pl b/challenge-252/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..1de3842ba8 --- /dev/null +++ b/challenge-252/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,18 @@ +use strict; +use warnings; +use feature 'say'; + +sub special_numbers { + my @in = @_; + my $n = scalar @in; + my $sq_sum = 0; + for my $i (0..$#in) { + $sq_sum += $in[$i] ** 2 unless $n % ($i+1); + } + return $sq_sum; +} + +for my $test ([<1 2 3 4>], [<2 7 1 19 18 3>]) { + printf "%-15s => ", "@$test"; + say special_numbers @$test; +} diff --git a/challenge-252/laurent-rosenfeld/perl/ch-2.pl b/challenge-252/laurent-rosenfeld/perl/ch-2.pl new file mode 100644 index 0000000000..fb888e79d1 --- /dev/null +++ b/challenge-252/laurent-rosenfeld/perl/ch-2.pl @@ -0,0 +1,16 @@ +use strict; +use warnings; +use feature 'say'; + +sub zero_sum { + my $n = shift; + my @result; + for my $i (1.. int $n/2) { + push @result, ($i, -$i); + } + push @result, 0 if $n % 2; + return @result; +} +for my $test (3, 4, 5, 1) { + say "$test => ", join " ", zero_sum $test; +} diff --git a/challenge-252/laurent-rosenfeld/raku/ch-1.raku b/challenge-252/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..c44a909359 --- /dev/null +++ b/challenge-252/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,13 @@ +sub special-numbers (@in) { + my $n = @in.elems; + my $sq-sum = 0; + for 0..@in.end -> $i { + $sq-sum += @in[$i]² if $n %% ($i+1); + } + return $sq-sum; +} + +for <1 2 3 4>, <2 7 1 19 18 3> -> @test { + printf "%-15s => ", "@test[]"; + say special-numbers @test; +} diff --git a/challenge-252/laurent-rosenfeld/raku/ch-2.raku b/challenge-252/laurent-rosenfeld/raku/ch-2.raku new file mode 100644 index 0000000000..42d40de711 --- /dev/null +++ b/challenge-252/laurent-rosenfeld/raku/ch-2.raku @@ -0,0 +1,11 @@ +sub zero-sum ($n) { + my @result; + for (1..$n*2).pick(($n/2).Int) -> $i { + append @result, ($i, -$i); + } + append @result, 0 unless $n %% 2; + return @result; +} +for 3, 4, 5, 1 -> $test { + say "$test => ", zero-sum $test; +} diff --git a/challenge-252/perlboy1967/perl/ch-1.pl b/challenge-252/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..e8ae528469 --- /dev/null +++ b/challenge-252/perlboy1967/perl/ch-1.pl @@ -0,0 +1,38 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 252 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-252 + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Special Numbers +Submitted by: Mohammad S Anwar + +You are given an array of integers, @ints. + +Write a script to find the sum of the squares of all special elements of the given array. + +|| An element $int[i] of @ints is called special if i divides n, i.e. n % i == 0. +|| Where n is the length of the given array. Also the array is 1-indexed for the task. + +=cut + +use v5.32; +use common::sense; +use feature qw(signatures); + +use Test2::V0; + +use List::Util qw(sum0); + +sub specialNumbers (@ints) { + my $n = $#ints + 1; + sum0 map { $ints[$_ - 1] ** 2 } grep { $n % $_ == 0 } 1 .. $n; +} + +is(specialNumbers(1,2,3,4),21); +is(specialNumbers(2,7,1,19,18,3),63); + +done_testing; diff --git a/challenge-252/perlboy1967/perl/ch-2.pl b/challenge-252/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..225f32ac2a --- /dev/null +++ b/challenge-252/perlboy1967/perl/ch-2.pl @@ -0,0 +1,40 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 252 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-252 + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Unique Sum Zero +Submitted by: Mohammad S Anwar + +You are given an integer, $n. + +Write a script to find an array containing $n unique integers such that they add up to zero. + +=cut + +use v5.32; +use common::sense; +use feature qw(signatures); + +use Test2::V0; + +sub uniqSumZero ($n) { + my @n = (0); + if ($n > 1) { + @n = map { (-$_,$_) } 1 .. $n >> 1; + push(@n,0) if ($n % 2 != 0); + } + [sort { $a <=> $b } @n]; +} + +is(uniqSumZero(1),[0]); +is(uniqSumZero(2),[-1,1]); +is(uniqSumZero(3),[-1,0,1]); +is(uniqSumZero(4),[-2,-1,1,2]); +is(uniqSumZero(5),[-2,-1,0,1,2]); + +done_testing; diff --git a/challenge-252/perlboy1967/perl/ch1.pl b/challenge-252/perlboy1967/perl/ch1.pl deleted file mode 100755 index e8ae528469..0000000000 --- a/challenge-252/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 252 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-252 - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Special Numbers -Submitted by: Mohammad S Anwar - -You are given an array of integers, @ints. - -Write a script to find the sum of the squares of all special elements of the given array. - -|| An element $int[i] of @ints is called special if i divides n, i.e. n % i == 0. -|| Where n is the length of the given array. Also the array is 1-indexed for the task. - -=cut - -use v5.32; -use common::sense; -use feature qw(signatures); - -use Test2::V0; - -use List::Util qw(sum0); - -sub specialNumbers (@ints) { - my $n = $#ints + 1; - sum0 map { $ints[$_ - 1] ** 2 } grep { $n % $_ == 0 } 1 .. $n; -} - -is(specialNumbers(1,2,3,4),21); -is(specialNumbers(2,7,1,19,18,3),63); - -done_testing; diff --git a/challenge-252/perlboy1967/perl/ch2.pl b/challenge-252/perlboy1967/perl/ch2.pl deleted file mode 100755 index 225f32ac2a..0000000000 --- a/challenge-252/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 252 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-252 - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Unique Sum Zero -Submitted by: Mohammad S Anwar - -You are given an integer, $n. - -Write a script to find an array containing $n unique integers such that they add up to zero. - -=cut - -use v5.32; -use common::sense; -use feature qw(signatures); - -use Test2::V0; - -sub uniqSumZero ($n) { - my @n = (0); - if ($n > 1) { - @n = map { (-$_,$_) } 1 .. $n >> 1; - push(@n,0) if ($n % 2 != 0); - } - [sort { $a <=> $b } @n]; -} - -is(uniqSumZero(1),[0]); -is(uniqSumZero(2),[-1,1]); -is(uniqSumZero(3),[-1,0,1]); -is(uniqSumZero(4),[-2,-1,1,2]); -is(uniqSumZero(5),[-2,-1,0,1,2]); - -done_testing; diff --git a/challenge-252/steven-wilson/python/ch-01.py b/challenge-252/steven-wilson/python/ch-01.py deleted file mode 100644 index 1beb425462..0000000000 --- a/challenge-252/steven-wilson/python/ch-01.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python3 - - -def special_numbers(*integers): - '''Given an array of integers, find the sum of the squares of all special - elements of the array. - - An element $int[i] of @ints is called special if i divides n, i.e. - n % i == 0. Where n is the length of the given array. The array is - 1-indexed. - >>> special_numbers(1, 2, 3, 4) - 21 - >>> special_numbers(2, 7, 1, 19, 18, 3) - 63 - ''' - len_i = len(integers) - return sum(integers[x-1] * integers[x-1] for x in range(1, len_i+1) if len_i % x == 0) - - -if __name__ == "__main__": - import doctest - - doctest.testmod() diff --git a/challenge-252/steven-wilson/python/ch-1.py b/challenge-252/steven-wilson/python/ch-1.py new file mode 100644 index 0000000000..1beb425462 --- /dev/null +++ b/challenge-252/steven-wilson/python/ch-1.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + + +def special_numbers(*integers): + '''Given an array of integers, find the sum of the squares of all special + elements of the array. + + An element $int[i] of @ints is called special if i divides n, i.e. + n % i == 0. Where n is the length of the given array. The array is + 1-indexed. + >>> special_numbers(1, 2, 3, 4) + 21 + >>> special_numbers(2, 7, 1, 19, 18, 3) + 63 + ''' + len_i = len(integers) + return sum(integers[x-1] * integers[x-1] for x in range(1, len_i+1) if len_i % x == 0) + + +if __name__ == "__main__": + import doctest + + doctest.testmod() diff --git a/challenge-252/ulrich-rieke/cpp/ch-1.cpp b/challenge-252/ulrich-rieke/cpp/ch-1.cpp new file mode 100755 index 0000000000..a99e8d5227 --- /dev/null +++ b/challenge-252/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,18 @@ +#include +#include +#include +#include + +int main( ) { + std::cout << "Enter some integers , separated by blanks, end to end!\n" ; + std::vector numbers { std::istream_iterator{ std::cin } , + std::istream_iterator{} } ; + int sum = 0 ; + int len = numbers.size( ) ; + for ( int i = 0 ; i < len ; i++ ) { + if ( len % ( i + 1 ) == 0 ) + sum += numbers[ i ] * numbers[ i ] ; + } + std::cout << sum << '\n' ; + return 0 ; +} diff --git a/challenge-252/ulrich-rieke/cpp/ch-2.cpp b/challenge-252/ulrich-rieke/cpp/ch-2.cpp new file mode 100755 index 0000000000..5e88c46688 --- /dev/null +++ b/challenge-252/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include + +int main( ) { + std::cout << "Enter a positive integer!\n" ; + int number ; + std::cin >> number ; + int limit = number / 2 ; + int neg_limit = -limit ; + std::vector solution ; + if ( number % 2 == 1 ) { + solution.reserve( number ) ; + std::iota( solution.begin( ) , solution.end( ) , neg_limit ) ; + } + else { + int current = neg_limit ; + for ( int i = 0 ; i < number - 1 ; i++ ) { + solution.push_back( current ) ; + current++ ; + } + int sum = std::accumulate( solution.begin( ) , solution.end( ) , + 0 ) ; + solution.push_back( 0 - sum ) ; + } + std::cout << '(' ; + std::copy( solution.begin( ) , solution.end( ) , + std::ostream_iterator( std::cout , " " )) ; + std::cout << ")\n" ; + return 0 ; +} diff --git a/challenge-252/ulrich-rieke/haskell/ch-1.hs b/challenge-252/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..b5b2edb293 --- /dev/null +++ b/challenge-252/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,9 @@ +module Challenge252 + where + +solution :: [Int] -> Int +solution list = sum $ map (\p -> snd p ^ 2 ) $ filter (\p -> mod l + ( fst p + 1 ) == 0 ) $ zip [0 , 1..] list + where + l = length list + diff --git a/challenge-252/ulrich-rieke/haskell/ch-2.hs b/challenge-252/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..ac0ab60890 --- /dev/null +++ b/challenge-252/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,10 @@ +module Challenge252_2 + where + +solution :: Int -> [Int] +solution n + |odd n = [-limit..limit] + |even n = first_part ++ [0 - sum first_part] + where + limit = div n 2 + first_part = take ( n - 1 ) $ iterate ( + 1 ) (limit * ( -1 ) ) diff --git a/challenge-252/ulrich-rieke/perl/ch-1.pl b/challenge-252/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..6f2b246c6b --- /dev/null +++ b/challenge-252/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +say "Enter some integers, separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my $len = scalar( @numbers ) ; +my $sum = 0 ; +for my $i (0..$len - 1 ) { + if ( $len % ( $i + 1 ) == 0 ) { + $sum += $numbers[ $i ] ** 2 ; + } +} +say $sum ; diff --git a/challenge-252/ulrich-rieke/perl/ch-2.pl b/challenge-252/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..f6e669fb85 --- /dev/null +++ b/challenge-252/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( sum ) ; + +say "Enter a positive integer!" ; +my $number = ; +chomp $number ; +my @solution ; +my $limit = int( $number / 2 ) ; +my $neg_limit = -$limit ; +if ( $number % 2 == 1 ) { + for my $num ( $neg_limit..$limit ) { + push @solution, $num ; + } +} +else { + my $current = $neg_limit ; + for (1..$number - 1 ) { + push @solution, $current ; + $current++ ; + } + my $sum = sum( @solution ) ; + push @solution, 0 - $sum ; +} +say "(" . join( ',' , @solution ) . ")" ; + + diff --git a/challenge-252/ulrich-rieke/raku/ch-1.raku b/challenge-252/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..899b12d639 --- /dev/null +++ b/challenge-252/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,13 @@ +use v6 ; + +say "Enter some integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my $sum = 0 ; +my $len = @numbers.elems ; +for ( 0..$len - 1 ) -> $i { + if ( $len %% ( $i + 1 )) { + $sum += @numbers[$i]** 2 ; + } +} +say $sum ; diff --git a/challenge-252/ulrich-rieke/raku/ch-2.raku b/challenge-252/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..25cff2e1e5 --- /dev/null +++ b/challenge-252/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,24 @@ +use v6 ; + +say "Enter a positive integer!" ; +my $line = $*IN.get ; +my $number = $line.Int ; +my @solution ; +my $limit = $number div 2 ; +my $neg_limit = $limit * (-1) ; +if ( not $number %% 2 ) { + for ( $neg_limit..$limit ) -> $num { + @solution.push( $num ) ; + } +} +else { + my $current = $neg_limit ; + for (1..$number - 1 ) { + @solution.push( $current ) ; + $current++ ; + } + my $sum = [+] @solution ; + @solution.push( 0 - $sum ) ; +} +say "(" ~ @solution.join( ',' ) ~ ")" ; + diff --git a/challenge-252/ulrich-rieke/rust/ch-1.rs b/challenge-252/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..95f3f39b32 --- /dev/null +++ b/challenge-252/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,18 @@ +use std::io ; + +fn main() { + println!("Enter some integers, 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 mut sum : i32 = 0 ; + let len = numbers.len( ) ; + for i in 0..len { + if len % ( i + 1 ) == 0 { + sum += numbers[i].pow( 2 ) ; + } + } + println!("{}" , sum ) ; +} diff --git a/challenge-252/ulrich-rieke/rust/ch-2.rs b/challenge-252/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..449799be7e --- /dev/null +++ b/challenge-252/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,28 @@ +use std::io ; + +fn main() { + println!("Enter a positive integer!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let num : u32 = entered_line.trim( ).parse::( ).unwrap( ) ; + let mut solution : Vec = Vec::new( ) ; + let limit : u32 = num.div_euclid( 2 ) ; + let neg_limit : i32 = (limit as i32) * ( -1 ) ; + if num % 2 == 1 { + let pos_limit : i32 = limit as i32 ; + for i in neg_limit..=pos_limit { + solution.push( i ) ; + } + } + else { + let mut current : i32 = neg_limit ; + for _ in 0..num - 1 { + solution.push( current ) ; + current += 1 ; + } + let sum : i32 = solution.iter( ).sum::( ) ; + solution.push( 0 - sum ) ; + } + println!("{:?}" , solution ) ; +} diff --git a/stats/pwc-challenge-246.json b/stats/pwc-challenge-246.json index 83d8ebd515..51b7b4e097 100644 --- a/stats/pwc-challenge-246.json +++ b/stats/pwc-challenge-246.json @@ -1,35 +1,209 @@ { + "title" : { + "text" : "The Weekly Challenge - 246" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, "chart" : { "type" : "column" }, + "series" : [ + { + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 246", + "data" : [ + { + "drilldown" : "Adam Russell", + "name" : "Adam Russell", + "y" : 1 + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 4 + }, + { + "y" : 4, + "name" : "Athanasius", + "drilldown" : "Athanasius" + }, + { + "drilldown" : "BarrOff", + "y" : 2, + "name" : "BarrOff" + }, + { + "name" : "Bob Lied", + "y" : 3, + "drilldown" : "Bob Lied" + }, + { + "name" : "Bruce Gray", + "y" : 2, + "drilldown" : "Bruce Gray" + }, + { + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", + "y" : 3 + }, + { + "drilldown" : "Dave Jacoby", + "y" : 3, + "name" : "Dave Jacoby" + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "y" : 2, + "name" : "E. Choroba", + "drilldown" : "E. Choroba" + }, + { + "y" : 2, + "name" : "Humberto Massa", + "drilldown" : "Humberto Massa" + }, + { + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek", + "y" : 2 + }, + { + "y" : 3, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "y" : 6 + }, + { + "name" : "Lubos Kolouch", + "y" : 5, + "drilldown" : "Lubos Kolouch" + }, + { + "y" : 10, + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" + }, + { + "name" : "Mark Anderson", + "y" : 2, + "drilldown" : "Mark Anderson" + }, + { + "y" : 1, + "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh" + }, + { + "name" : "Nelo Tovar", + "y" : 2, + "drilldown" : "Nelo Tovar" + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Oliver Oviedo", + "name" : "Oliver Oviedo", + "y" : 1 + }, + { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { + "name" : "Paulo Custodio", + "y" : 1, + "drilldown" : "Paulo Custodio" + }, + { + "y" : 3, + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith" + }, + { + "drilldown" : "Peter Meszaros", + "name" : "Peter Meszaros", + "y" : 2 + }, + { + "name" : "Robert DiCicco", + "y" : 2, + "drilldown" : "Robert DiCicco" + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "drilldown" : "Stephen G. Lynn", + "name" : "Stephen G. Lynn", + "y" : 3 + }, + { + "name" : "Thomas Kohler", + "y" : 4, + "drilldown" : "Thomas Kohler" + }, + { + "y" : 3, + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan" + } + ] + } + ], + "subtitle" : { + "text" : "[Champions: 31] Last updated at 2024-01-16 20:14:14 GMT" + }, "xAxis" : { "type" : "category" }, - "tooltip" : { - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" - }, - "subtitle" : { - "text" : "[Champions: 30] Last updated at 2023-12-13 08:26:17 GMT" + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, - "title" : { - "text" : "The Weekly Challenge - 246" + "legend" : { + "enabled" : 0 }, "drilldown" : { "series" : [ { + "id" : "Adam Russell", "data" : [ [ "Perl", 1 ] ], - "name" : "Adam Russell", - "id" : "Adam Russell" + "name" : "Adam Russell" }, { - "name" : "Arne Sommer", "data" : [ [ "Perl", @@ -44,11 +218,10 @@ 1 ] ], + "name" : "Arne Sommer", "id" : "Arne Sommer" }, { - "id" : "Athanasius", - "name" : "Athanasius", "data" : [ [ "Perl", @@ -58,10 +231,11 @@ "Raku", 2 ] - ] + ], + "name" : "Athanasius", + "id" : "Athanasius" }, { - "id" : "BarrOff", "name" : "BarrOff", "data" : [ [ @@ -72,7 +246,8 @@ "Raku", 1 ] - ] + ], + "id" : "BarrOff" }, { "id" : "Bob Lied", @@ -89,16 +264,17 @@ ] }, { - "name" : "Bruce Gray", + "id" : "Bruce Gray", "data" : [ [ "Raku", 2 ] ], - "id" : "Bruce Gray" + "name" : "Bruce Gray" }, { + "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", "data" : [ [ @@ -109,12 +285,10 @@ "Blog", 1 ] - ], - "id" : "Cheok-Yin Fung" + ] }, { "id" : "Dave Jacoby", - "name" : "Dave Jacoby", "data" : [ [ "Perl", @@ -124,17 +298,18 @@ "Blog", 1 ] - ] + ], + "name" : "Dave Jacoby" }, { - "id" : "David Ferrone", "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "David Ferrone" }, { "id" : "E. Choroba", @@ -147,14 +322,14 @@ ] }, { - "id" : "Humberto Massa", "name" : "Humberto Massa", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Humberto Massa" }, { "id" : "Jan Krnavek", @@ -167,6 +342,7 @@ ] }, { + "id" : "Jorg Sommrey", "name" : "Jorg Sommrey", "data" : [ [ @@ -177,11 +353,9 @@ "Blog", 1 ] - ], - "id" : "Jorg Sommrey" + ] }, { - "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -196,10 +370,12 @@ 2 ] ], + "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld" }, { "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -213,11 +389,11 @@ "Blog", 1 ] - ], - "name" : "Lubos Kolouch" + ] }, { "id" : "Luca Ferrari", + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -227,48 +403,47 @@ "Blog", 8 ] - ], - "name" : "Luca Ferrari" + ] }, { - "id" : "Mark Anderson", "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson" }, { - "name" : "Matthew Neleigh", "data" : [ [ "Perl", 1 ] ], + "name" : "Matthew Neleigh", "id" : "Matthew Neleigh" }, { + "id" : "Nelo Tovar", + "name" : "Nelo Tovar", "data" : [ [ "Perl", 2 ] - ], - "name" : "Nelo Tovar", - "id" : "Nelo Tovar" + ] }, { - "id" : "Niels van Dijke", "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Niels van Dijke" }, { "id" : "Oliver Oviedo", @@ -281,7 +456,6 @@ ] }, { - "id" : "Packy Anderson", "data" : [ [ "Perl", @@ -296,9 +470,21 @@ 1 ] ], - "name" : "Packy Anderson" + "name" : "Packy Anderson", + "id" : "Packy Anderson" }, { + "id" : "Paulo Custodio", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Paulo Custodio" + }, + { + "id" : "Peter Campbell Smith", "name" : "Peter Campbell Smith", "data" : [ [ @@ -309,8 +495,7 @@ "Blog", 1 ] - ], - "id" : "Peter Campbell Smith" + ] }, { "data" : [ @@ -338,15 +523,16 @@ }, { "id" : "Robert Ransbottom", - "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Robert Ransbottom" }, { + "id" : "Roger Bell_West", "name" : "Roger Bell_West", "data" : [ [ @@ -361,8 +547,7 @@ "Blog", 1 ] - ], - "id" : "Roger Bell_West" + ] }, { "id" : "Stephen G. Lynn", @@ -379,6 +564,8 @@ ] }, { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", "data" : [ [ "Perl", @@ -388,11 +575,11 @@ "Blog", 2 ] - ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + ] }, { + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -402,185 +589,13 @@ "Blog", 1 ] - ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + ] } ] }, - "legend" : { - "enabled" : 0 - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "series" : [ - { - "data" : [ - { - "drilldown" : "Adam Russell", - "y" : 1, - "name" : "Adam Russell" - }, - { - "y" : 4, - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "y" : 4, - "name" : "Athanasius" - }, - { - "name" : "BarrOff", - "y" : 2, - "drilldown" : "BarrOff" - }, - { - "drilldown" : "Bob Lied", - "name" : "Bob Lied", - "y" : 3 - }, - { - "drilldown" : "Bruce Gray", - "y" : 2, - "name" : "Bruce Gray" - }, - { - "name" : "Cheok-Yin Fung", - "y" : 3, - "drilldown" : "Cheok-Yin Fung" - }, - { - "name" : "Dave Jacoby", - "y" : 3, - "drilldown" : "Dave Jacoby" - }, - { - "drilldown" : "David Ferrone", - "name" : "David Ferrone", - "y" : 2 - }, - { - "name" : "E. Choroba", - "y" : 2, - "drilldown" : "E. Choroba" - }, - { - "y" : 2, - "name" : "Humberto Massa", - "drilldown" : "Humberto Massa" - }, - { - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek", - "y" : 2 - }, - { - "name" : "Jorg Sommrey", - "y" : 3, - "drilldown" : "Jorg Sommrey" - }, - { - "y" : 6, - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld" - }, - { - "name" : "Lubos Kolouch", - "y" : 5, - "drilldown" : "Lubos Kolouch" - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 10 - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 - }, - { - "drilldown" : "Matthew Neleigh", - "y" : 1, - "name" : "Matthew Neleigh" - }, - { - "drilldown" : "Nelo Tovar", - "name" : "Nelo Tovar", - "y" : 2 - }, - { - "name" : "Niels van Dijke", - "y" : 2, - "drilldown" : "Niels van Dijke" - }, - { - "drilldown" : "Oliver Oviedo", - "y" : 1, - "name" : "Oliver Oviedo" - }, - { - "y" : 5, - "name" : "Packy Anderson", - "drilldown" : "Packy Anderson" - }, - { - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", - "y" : 3 - }, - { - "drilldown" : "Peter Meszaros", - "y" : 2, - "name" : "Peter Meszaros" - }, - { - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco", - "y" : 2 - }, - { - "y" : 2, - "name" : "Robert Ransbottom", - "drilldown" : "Robert Ransbottom" - }, - { - "drilldown" : "Roger Bell_West", - "y" : 5, - "name" : "Roger Bell_West" - }, - { - "drilldown" : "Stephen G. Lynn", - "name" : "Stephen G. Lynn", - "y" : 3 - }, - { - "y" : 4, - "name" : "Thomas Kohler", - "drilldown" : "Thomas Kohler" - }, - { - "y" : 3, - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan" - } - ], - "name" : "The Weekly Challenge - 246", - "colorByPoint" : 1 - } - ], - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" } } diff --git a/stats/pwc-challenge-250.json b/stats/pwc-challenge-250.json index f31e242126..78d73eaf72 100644 --- a/stats/pwc-challenge-250.json +++ b/stats/pwc-challenge-250.json @@ -1,22 +1,231 @@ { + "title" : { + "text" : "The Weekly Challenge - 250" + }, + "chart" : { + "type" : "column" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "series" : [ + { + "name" : "The Weekly Challenge - 250", + "data" : [ + { + "name" : "Adam Russell", + "y" : 2, + "drilldown" : "Adam Russell" + }, + { + "name" : "Ali Moradi", + "y" : 5, + "drilldown" : "Ali Moradi" + }, + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" + }, + { + "y" : 4, + "name" : "BarrOff", + "drilldown" : "BarrOff" + }, + { + "name" : "Bob Lied", + "y" : 2, + "drilldown" : "Bob Lied" + }, + { + "name" : "Bruce Gray", + "y" : 2, + "drilldown" : "Bruce Gray" + }, + { + "drilldown" : "Cheok-Yin Fung", + "y" : 2, + "name" : "Cheok-Yin Fung" + }, + { + "name" : "Dave Jacoby", + "y" : 3, + "drilldown" : "Dave Jacoby" + }, + { + "name" : "David Ferrone", + "y" : 2, + "drilldown" : "David Ferrone" + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "name" : "Jan Krnavek", + "y" : 2, + "drilldown" : "Jan Krnavek" + }, + { + "y" : 3, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Laurent Rosenfeld", + "y" : 6, + "drilldown" : "Laurent Rosenfeld" + }, + { + "y" : 5, + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "y" : 10, + "drilldown" : "Luca Ferrari" + }, + { + "name" : "Mark Anderson", + "y" : 4, + "drilldown" : "Mark Anderson" + }, + { + "name" : "Matthew Neleigh", + "y" : 2, + "drilldown" : "Matthew Neleigh" + }, + { + "name" : "Mustafa Aydin", + "y" : 2, + "drilldown" : "Mustafa Aydin" + }, + { + "name" : "Nelo Tovar", + "y" : 2, + "drilldown" : "Nelo Tovar" + }, + { + "name" : "Niels van Dijke", + "y" : 2, + "drilldown" : "Niels van Dijke" + }, + { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { + "name" : "Paulo Custodio", + "y" : 2, + "drilldown" : "Paulo Custodio" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "name" : "Peter Meszaros", + "y" : 2, + "drilldown" : "Peter Meszaros" + }, + { + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", + "y" : 3 + }, + { + "y" : 2, + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom" + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "drilldown" : "Simon Proctor", + "name" : "Simon Proctor", + "y" : 2 + }, + { + "y" : 2, + "name" : "Solathian", + "drilldown" : "Solathian" + }, + { + "y" : 3, + "name" : "Stephen G. Lynn", + "drilldown" : "Stephen G. Lynn" + }, + { + "name" : "Thomas Kohler", + "y" : 4, + "drilldown" : "Thomas Kohler" + }, + { + "drilldown" : "Ulrich Rieke", + "y" : 4, + "name" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "y" : 3, + "name" : "W. Luis Mochan" + } + ], + "colorByPoint" : 1 + } + ], "yAxis" : { "title" : { "text" : "Total Solutions" } }, "subtitle" : { - "text" : "[Champions: 35] Last updated at 2024-01-08 19:02:16 GMT" + "text" : "[Champions: 36] Last updated at 2024-01-16 20:14:14 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "legend" : { + "enabled" : 0 }, "drilldown" : { "series" : [ { - "name" : "Adam Russell", "data" : [ [ "Perl", 2 ] ], + "name" : "Adam Russell", "id" : "Adam Russell" }, { @@ -52,7 +261,6 @@ ] }, { - "id" : "Athanasius", "name" : "Athanasius", "data" : [ [ @@ -63,9 +271,11 @@ "Raku", 2 ] - ] + ], + "id" : "Athanasius" }, { + "id" : "BarrOff", "data" : [ [ "Perl", @@ -76,8 +286,7 @@ 2 ] ], - "name" : "BarrOff", - "id" : "BarrOff" + "name" : "BarrOff" }, { "id" : "Bob Lied", @@ -90,27 +299,26 @@ "name" : "Bob Lied" }, { - "id" : "Bruce Gray", - "name" : "Bruce Gray", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Bruce Gray", + "id" : "Bruce Gray" }, { + "id" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] ], - "name" : "Cheok-Yin Fung", - "id" : "Cheok-Yin Fung" + "name" : "Cheok-Yin Fung" }, { - "id" : "Dave Jacoby", "name" : "Dave Jacoby", "data" : [ [ @@ -121,17 +329,18 @@ "Blog", 1 ] - ] + ], + "id" : "Dave Jacoby" }, { - "id" : "David Ferrone", - "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "David Ferrone", + "id" : "David Ferrone" }, { "data" : [ @@ -144,6 +353,7 @@ "id" : "E. Choroba" }, { + "name" : "Jaldhar H. Vyas", "data" : [ [ "Perl", @@ -158,21 +368,21 @@ 1 ] ], - "name" : "Jaldhar H. Vyas", "id" : "Jaldhar H. Vyas" }, { - "name" : "Jan Krnavek", + "id" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] ], - "id" : "Jan Krnavek" + "name" : "Jan Krnavek" }, { "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", "data" : [ [ "Perl", @@ -182,11 +392,9 @@ "Blog", 1 ] - ], - "name" : "Jorg Sommrey" + ] }, { - "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -201,10 +409,10 @@ 2 ] ], + "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld" }, { - "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -219,9 +427,11 @@ 1 ] ], + "name" : "Lubos Kolouch", "id" : "Lubos Kolouch" }, { + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -232,10 +442,10 @@ 8 ] ], - "name" : "Luca Ferrari", - "id" : "Luca Ferrari" + "name" : "Luca Ferrari" }, { + "id" : "Mark Anderson", "data" : [ [ "Raku", @@ -246,28 +456,27 @@ 2 ] ], - "name" : "Mark Anderson", - "id" : "Mark Anderson" + "name" : "Mark Anderson" }, { + "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] ], - "name" : "Matthew Neleigh", "id" : "Matthew Neleigh" }, { - "id" : "Mustafa Aydin", - "name" : "Mustafa Aydin", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Mustafa Aydin", + "id" : "Mustafa Aydin" }, { "id" : "Nelo Tovar", @@ -280,18 +489,16 @@ "name" : "Nelo Tovar" }, { + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], - "name" : "Niels van Dijke", - "id" : "Niels van Dijke" + "name" : "Niels van Dijke" }, { - "id" : "Packy Anderson", - "name" : "Packy Anderson", "data" : [ [ "Perl", @@ -305,7 +512,19 @@ "Blog", 1 ] - ] + ], + "name" : "Packy Anderson", + "id" : "Packy Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Paulo Custodio", + "id" : "Paulo Custodio" }, { "id" : "Peter Campbell Smith", @@ -322,16 +541,17 @@ ] }, { - "name" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] ], + "name" : "Peter Meszaros", "id" : "Peter Meszaros" }, { + "id" : "Robbie Hatley", "data" : [ [ "Perl", @@ -342,21 +562,19 @@ 1 ] ], - "name" : "Robbie Hatley", - "id" : "Robbie Hatley" + "name" : "Robbie Hatley" }, { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ], - "name" : "Robert Ransbottom", - "id" : "Robert Ransbottom" + ] }, { - "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -371,6 +589,7 @@ 1 ] ], + "name" : "Roger Bell_West", "id" : "Roger Bell_West" }, { @@ -388,13 +607,13 @@ "name" : "Simon Green" }, { - "name" : "Simon Proctor", "data" : [ [ "Raku", 2 ] ], + "name" : "Simon Proctor", "id" : "Simon Proctor" }, { @@ -408,6 +627,7 @@ "name" : "Solathian" }, { + "name" : "Stephen G. Lynn", "data" : [ [ "Perl", @@ -418,11 +638,10 @@ 1 ] ], - "name" : "Stephen G. Lynn", "id" : "Stephen G. Lynn" }, { - "name" : "Thomas Kohler", + "id" : "Thomas Kohler", "data" : [ [ "Perl", @@ -433,10 +652,9 @@ 2 ] ], - "id" : "Thomas Kohler" + "name" : "Thomas Kohler" }, { - "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -447,7 +665,8 @@ 2 ] ], - "name" : "Ulrich Rieke" + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { "data" : [ @@ -465,213 +684,9 @@ } ] }, - "legend" : { - "enabled" : 0 - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "chart" : { - "type" : "column" - }, "tooltip" : { "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" - }, - "title" : { - "text" : "The Weekly Challenge - 250" - }, - "series" : [ - { - "colorByPoint" : 1, - "data" : [ - { - "name" : "Adam Russell", - "y" : 2, - "drilldown" : "Adam Russell" - }, - { - "drilldown" : "Ali Moradi", - "y" : 5, - "name" : "Ali Moradi" - }, - { - "name" : "Arne Sommer", - "y" : 3, - "drilldown" : "Arne Sommer" - }, - { - "name" : "Athanasius", - "y" : 4, - "drilldown" : "Athanasius" - }, - { - "y" : 4, - "name" : "BarrOff", - "drilldown" : "BarrOff" - }, - { - "drilldown" : "Bob Lied", - "name" : "Bob Lied", - "y" : 2 - }, - { - "y" : 2, - "name" : "Bruce Gray", - "drilldown" : "Bruce Gray" - }, - { - "y" : 2, - "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung" - }, - { - "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" : "Jaldhar H. Vyas", - "y" : 5, - "name" : "Jaldhar H. Vyas" - }, - { - "y" : 2, - "name" : "Jan Krnavek", - "drilldown" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "y" : 3, - "drilldown" : "Jorg Sommrey" - }, - { - "name" : "Laurent Rosenfeld", - "y" : 6, - "drilldown" : "Laurent Rosenfeld" - }, - { - "name" : "Lubos Kolouch", - "y" : 5, - "drilldown" : "Lubos Kolouch" - }, - { - "name" : "Luca Ferrari", - "y" : 10, - "drilldown" : "Luca Ferrari" - }, - { - "drilldown" : "Mark Anderson", - "y" : 4, - "name" : "Mark Anderson" - }, - { - "name" : "Matthew Neleigh", - "y" : 2, - "drilldown" : "Matthew Neleigh" - }, - { - "name" : "Mustafa Aydin", - "y" : 2, - "drilldown" : "Mustafa Aydin" - }, - { - "y" : 2, - "name" : "Nelo Tovar", - "drilldown" : "Nelo Tovar" - }, - { - "name" : "Niels van Dijke", - "y" : 2, - "drilldown" : "Niels van Dijke" - }, - { - "y" : 5, - "name" : "Packy Anderson", - "drilldown" : "Packy Anderson" - }, - { - "y" : 3, - "name" : "Peter Campbell Smith", - "drilldown" : "Peter Campbell Smith" - }, - { - "name" : "Peter Meszaros", - "y" : 2, - "drilldown" : "Peter Meszaros" - }, - { - "y" : 3, - "name" : "Robbie Hatley", - "drilldown" : "Robbie Hatley" - }, - { - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom", - "y" : 2 - }, - { - "drilldown" : "Roger Bell_West", - "y" : 5, - "name" : "Roger Bell_West" - }, - { - "y" : 3, - "name" : "Simon Green", - "drilldown" : "Simon Green" - }, - { - "name" : "Simon Proctor", - "y" : 2, - "drilldown" : "Simon Proctor" - }, - { - "y" : 2, - "name" : "Solathian", - "drilldown" : "Solathian" - }, - { - "drilldown" : "Stephen G. Lynn", - "y" : 3, - "name" : "Stephen G. Lynn" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" - }, - { - "name" : "Ulrich Rieke", - "y" : 4, - "drilldown" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - } - ], - "name" : "The Weekly Challenge - 250" - } - ], - "xAxis" : { - "type" : "category" + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" } } diff --git a/stats/pwc-challenge-251.json b/stats/pwc-challenge-251.json new file mode 100644 index 0000000000..0164243c9a --- /dev/null +++ b/stats/pwc-challenge-251.json @@ -0,0 +1,661 @@ +{ + "tooltip" : { + "headerFormat" : "{series.name}
", + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "drilldown" : { + "series" : [ + { + "name" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Adam Russell" + }, + { + "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", + 1 + ] + ], + "name" : "BarrOff" + }, + { + "id" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Bob Lied" + }, + { + "id" : "Bruce Gray", + "name" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Cheok-Yin Fung" + }, + { + "id" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Dave Jacoby" + }, + { + "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "David Ferrone" + }, + { + "id" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba" + }, + { + "id" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Jaldhar H. Vyas"