From e2bcd5b91f30ead0274fca78de01038b4432995b Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Mon, 12 Jun 2023 05:17:44 +0100 Subject: - Added solutions by Roger Bell_West. - Added solutions by Robert DiCicco. - Added solutions by Ulrich Rieke. - Added solutions by Laurent Rosenfeld. - Added solutions by Niels van Dijke. - Added solutions by Simon Proctor. - Added solutions by Mark Anderson. - Added solutions by Peter Meszaros. - Added solutions by W. Luis Mochan. - Added solutions by David Ferrone. - Added solutions by Thomas Kohler. - Added solutions by Stephen G. Lynn. - Added solutions by Peter Campbell Smith. - Added solutions by E. Choroba. - Added solutions by Robbie Hatley. - Added solutions by Jorg Sommrey. - Added solutions by Cheok-Yin Fung. - Added solutions by Robert Ransbottom. - Added solutions by Flavio Poletti. - Added solutions by Jaldhar H. Vyas. - Added solutions by Avery Adams. - Added solutions by Bob Lied. - Added solutions by Athanasius. - Added solutions by Simon Green. - Added solutions by Jan Krnavek. - Added solutions by Lubos Kolouch. - Added solutions by BarrOff. - Added solutions by Solathian. - Added solutions by Matthias Muth. --- challenge-220/eric-cheung/python/ch-1.py | 17 + challenge-220/eric-cheung/python/ch-2.py | 26 + challenge-220/jeanluc2020/blog-1.txt | 1 - challenge-220/jeanluc2020/blog-2.txt | 1 - challenge-220/jeanluc2020/blog.txt | 1 + challenge-220/jeanluc2020/blog1.txt | 1 + challenge-220/john-horner/README | 1 + challenge-220/laurent-rosenfeld/blog.txt | 1 + challenge-220/laurent-rosenfeld/blog1.txt | 1 + challenge-220/laurent-rosenfeld/perl/ch-1.pl | 18 + challenge-220/laurent-rosenfeld/raku/ch-1.raku | 8 + challenge-220/laurent-rosenfeld/raku/ch-2.raku | 17 + challenge-220/perlboy1967/perl/ch-1.pl | 39 + challenge-220/perlboy1967/perl/ch-2.pl | 53 + challenge-220/perlboy1967/perl/ch1.pl | 39 - challenge-220/perlboy1967/perl/ch2.pl | 53 - challenge-220/robert-dicicco/julia/ch-1.jl | 49 + challenge-220/robert-dicicco/julia/ch-2.jl | 59 + challenge-220/robert-dicicco/perl/ch-1.pl | 62 + challenge-220/robert-dicicco/perl/ch-2.pl | 60 + challenge-220/robert-dicicco/python/ch-1.py | 38 + challenge-220/robert-dicicco/python/ch-2.py | 49 + challenge-220/robert-dicicco/raku/ch-1.raku | 59 + challenge-220/robert-dicicco/raku/ch-2.raku | 43 + challenge-220/robert-dicicco/ruby/ch-1.rb | 51 + challenge-220/robert-dicicco/ruby/ch-2.rb | 56 + challenge-220/ulrich-rieke/cpp/ch-1.cpp | 55 + challenge-220/ulrich-rieke/cpp/ch-2.cpp | 69 + challenge-220/ulrich-rieke/haskell/ch-1.hs | 13 + challenge-220/ulrich-rieke/haskell/ch-2.hs | 22 + challenge-220/ulrich-rieke/perl/ch-1.pl | 31 + challenge-220/ulrich-rieke/perl/ch-2.pl | 34 + challenge-220/ulrich-rieke/raku/ch-1.raku | 8 + challenge-220/ulrich-rieke/raku/ch-2.raku | 28 + challenge-220/ulrich-rieke/rust/ch-1.rs | 39 + challenge-220/ulrich-rieke/rust/ch-2.rs | 24 + members.json | 1 + stats/pwc-challenge-216.json | 495 ++-- stats/pwc-challenge-217.json | 578 ++--- stats/pwc-challenge-218.json | 242 +- stats/pwc-challenge-219.json | 571 +++++ stats/pwc-current.json | 576 +++-- stats/pwc-language-breakdown-summary.json | 52 +- stats/pwc-language-breakdown.json | 3005 ++++++++++++------------ stats/pwc-leaders.json | 882 ++++--- stats/pwc-summary-1-30.json | 56 +- stats/pwc-summary-121-150.json | 74 +- stats/pwc-summary-151-180.json | 138 +- stats/pwc-summary-181-210.json | 58 +- stats/pwc-summary-211-240.json | 152 +- stats/pwc-summary-241-270.json | 78 +- stats/pwc-summary-271-300.json | 44 +- stats/pwc-summary-31-60.json | 56 +- stats/pwc-summary-61-90.json | 46 +- stats/pwc-summary-91-120.json | 118 +- stats/pwc-summary.json | 156 +- 56 files changed, 5064 insertions(+), 3440 deletions(-) create mode 100755 challenge-220/eric-cheung/python/ch-1.py create mode 100755 challenge-220/eric-cheung/python/ch-2.py delete mode 100644 challenge-220/jeanluc2020/blog-1.txt delete mode 100644 challenge-220/jeanluc2020/blog-2.txt create mode 100644 challenge-220/jeanluc2020/blog.txt create mode 100644 challenge-220/jeanluc2020/blog1.txt create mode 100644 challenge-220/john-horner/README create mode 100644 challenge-220/laurent-rosenfeld/blog.txt create mode 100644 challenge-220/laurent-rosenfeld/blog1.txt create mode 100644 challenge-220/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-220/laurent-rosenfeld/raku/ch-1.raku create mode 100644 challenge-220/laurent-rosenfeld/raku/ch-2.raku create mode 100755 challenge-220/perlboy1967/perl/ch-1.pl create mode 100755 challenge-220/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-220/perlboy1967/perl/ch1.pl delete mode 100755 challenge-220/perlboy1967/perl/ch2.pl create mode 100644 challenge-220/robert-dicicco/julia/ch-1.jl create mode 100644 challenge-220/robert-dicicco/julia/ch-2.jl create mode 100644 challenge-220/robert-dicicco/perl/ch-1.pl create mode 100644 challenge-220/robert-dicicco/perl/ch-2.pl create mode 100644 challenge-220/robert-dicicco/python/ch-1.py create mode 100644 challenge-220/robert-dicicco/python/ch-2.py create mode 100644 challenge-220/robert-dicicco/raku/ch-1.raku create mode 100644 challenge-220/robert-dicicco/raku/ch-2.raku create mode 100644 challenge-220/robert-dicicco/ruby/ch-1.rb create mode 100644 challenge-220/robert-dicicco/ruby/ch-2.rb create mode 100644 challenge-220/ulrich-rieke/cpp/ch-1.cpp create mode 100644 challenge-220/ulrich-rieke/cpp/ch-2.cpp create mode 100644 challenge-220/ulrich-rieke/haskell/ch-1.hs create mode 100644 challenge-220/ulrich-rieke/haskell/ch-2.hs create mode 100644 challenge-220/ulrich-rieke/perl/ch-1.pl create mode 100644 challenge-220/ulrich-rieke/perl/ch-2.pl create mode 100644 challenge-220/ulrich-rieke/raku/ch-1.raku create mode 100644 challenge-220/ulrich-rieke/raku/ch-2.raku create mode 100644 challenge-220/ulrich-rieke/rust/ch-1.rs create mode 100644 challenge-220/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-219.json diff --git a/challenge-220/eric-cheung/python/ch-1.py b/challenge-220/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..5ee515aea5 --- /dev/null +++ b/challenge-220/eric-cheung/python/ch-1.py @@ -0,0 +1,17 @@ + +## arrWordList = ["Perl", "Rust", "Raku"] ## Example 1 +arrWordList = ["love", "live", "leave"] ## Example 2 + +arrOutputList = [] + +for charLoop in arrWordList[0]: + bExist = True + for wordLoop in arrWordList[1:]: + if not charLoop in wordLoop.lower(): + bExist = False + break + + if bExist: + arrOutputList.append(charLoop) + +print (arrOutputList) diff --git a/challenge-220/eric-cheung/python/ch-2.py b/challenge-220/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..9370992564 --- /dev/null +++ b/challenge-220/eric-cheung/python/ch-2.py @@ -0,0 +1,26 @@ + +from itertools import permutations +from math import sqrt + +def IsPerfectSqr (nInput): + dSqRoot = int(sqrt(nInput)) + return (dSqRoot * dSqRoot == nInput) + +arrIntList = [1, 17, 8] ## Example 1 +## arrIntList = [2, 2, 2] ## Example 2 + +arrOutputList = [] + +arrPerm = set(permutations(arrIntList)) + +for permLoop in list(arrPerm): + bIsSqrFul = True + for nIndx in range(0, len(permLoop) - 1): + if not IsPerfectSqr(permLoop[nIndx] + permLoop[nIndx + 1]): + bIsSqrFul = False + break + + if bIsSqrFul and not permLoop in arrOutputList: + arrOutputList.append(permLoop) + +print (arrOutputList) diff --git a/challenge-220/jeanluc2020/blog-1.txt b/challenge-220/jeanluc2020/blog-1.txt deleted file mode 100644 index 9df40ba86f..0000000000 --- a/challenge-220/jeanluc2020/blog-1.txt +++ /dev/null @@ -1 +0,0 @@ -http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/perl/theweeklychallenge-220-1.html diff --git a/challenge-220/jeanluc2020/blog-2.txt b/challenge-220/jeanluc2020/blog-2.txt deleted file mode 100644 index 4169e0e056..0000000000 --- a/challenge-220/jeanluc2020/blog-2.txt +++ /dev/null @@ -1 +0,0 @@ -http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/perl/theweeklychallenge-220-2.html diff --git a/challenge-220/jeanluc2020/blog.txt b/challenge-220/jeanluc2020/blog.txt new file mode 100644 index 0000000000..9df40ba86f --- /dev/null +++ b/challenge-220/jeanluc2020/blog.txt @@ -0,0 +1 @@ +http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/perl/theweeklychallenge-220-1.html diff --git a/challenge-220/jeanluc2020/blog1.txt b/challenge-220/jeanluc2020/blog1.txt new file mode 100644 index 0000000000..4169e0e056 --- /dev/null +++ b/challenge-220/jeanluc2020/blog1.txt @@ -0,0 +1 @@ +http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/perl/theweeklychallenge-220-2.html diff --git a/challenge-220/john-horner/README b/challenge-220/john-horner/README new file mode 100644 index 0000000000..c860d6f0be --- /dev/null +++ b/challenge-220/john-horner/README @@ -0,0 +1 @@ +Solutions by John Horner. diff --git a/challenge-220/laurent-rosenfeld/blog.txt b/challenge-220/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..7d399e9609 --- /dev/null +++ b/challenge-220/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/06/perl-weekly-challenge-220-common-characters.html diff --git a/challenge-220/laurent-rosenfeld/blog1.txt b/challenge-220/laurent-rosenfeld/blog1.txt new file mode 100644 index 0000000000..b29e61b761 --- /dev/null +++ b/challenge-220/laurent-rosenfeld/blog1.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/06/perl-weekly-challenge-220-squareful-arrays.html diff --git a/challenge-220/laurent-rosenfeld/perl/ch-1.pl b/challenge-220/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..e311038510 --- /dev/null +++ b/challenge-220/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,18 @@ +use strict; +use warnings; +use feature 'say'; + +sub common_char { + my %histo; + my @in = map lc $_, @_; + for my $word (@in) { + my %unique = map { $_ => 1 } split //, $word; + $histo{$_}++ for keys %unique; + } + return sort grep { $histo{$_} == scalar @in } keys %histo; +} + +for my $test ([], []) { + printf "%-15s => ", "@$test"; + say join " ", common_char @$test; +} diff --git a/challenge-220/laurent-rosenfeld/raku/ch-1.raku b/challenge-220/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..306b69a061 --- /dev/null +++ b/challenge-220/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,8 @@ +sub common-char (@in) { + return sort keys ([∩] map {.lc.comb}, @in); +} + +for , -> @test { + printf "%-15s => ", "@test[]"; + say common-char @test; +} diff --git a/challenge-220/laurent-rosenfeld/raku/ch-2.raku b/challenge-220/laurent-rosenfeld/raku/ch-2.raku new file mode 100644 index 0000000000..c79d803297 --- /dev/null +++ b/challenge-220/laurent-rosenfeld/raku/ch-2.raku @@ -0,0 +1,17 @@ +sub is-squareful (@in) { + for @in.rotor(2 => -1) -> @list { + my $sum = [+] @list; + return False if ($sum.sqrt.Int)² != $sum; + } + return True; +} +sub find-squareful (@in) { + my $result = SetHash.new; + for @in.permutations -> $perm { + $result{"($perm)"}++ if is-squareful $perm; + } + return join ", ", $result.keys; +} +for <1 17 8>, <17 1 8>, <2 2 2> -> @test { + say @test, " => ", find-squareful @test; +} diff --git a/challenge-220/perlboy1967/perl/ch-1.pl b/challenge-220/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..29be6dc082 --- /dev/null +++ b/challenge-220/perlboy1967/perl/ch-1.pl @@ -0,0 +1,39 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 220 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-220 + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Common Characters +Submitted by: Mohammad S Anwar + +You are given a list of words. + +Write a script to return the list of common characters (sorted alphabeticall) +found in every word of the given list. + +=cut + +use v5.16; + +use common::sense; + +use Test::More; +use Test::Deep qw(cmp_deeply); + +use List::MoreUtils qw(uniq); + +sub commonChars (@) { + my %c; + map { $c{$_}++ } uniq split //,lc for (@_); + sort grep { $c{$_} == scalar @_ } keys %c; +} + +cmp_deeply([commonChars(qw(Perl Rust Raku))],[qw(r)]); +cmp_deeply([commonChars(qw(love live leave))],[qw(e l v)]); +cmp_deeply([commonChars(qw(bamboo bank))],[qw(a b)]); + +done_testing; diff --git a/challenge-220/perlboy1967/perl/ch-2.pl b/challenge-220/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..c31e23c80e --- /dev/null +++ b/challenge-220/perlboy1967/perl/ch-2.pl @@ -0,0 +1,53 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 220 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-220 + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Squareful +Submitted by: Mohammad S Anwar + +You are given an array of integers, @ints. + +|| An array is squareful if the sum of every pair of adjacent elements is a perfect square. + +Write a script to find all the permutations of the given array that are squareful. + +=cut + +use v5.16; + +use common::sense; + +use Test::More; +use Test::Deep qw(cmp_deeply); + +use List::MoreUtils qw(uniq slide all); +use Algorithm::Combinatorics qw(permutations); + +sub _areSquareful ($$) { + my $s = $_[0] + $_[1]; + state $c = {}; + $c->{$s} //= int($s**0.5) == $s**0.5; + return $c->{$s}; +} + +sub squareful (\@) { + my ($ar,$u,@r) = ($_[0],uniq(@{$_[0]}) == 1); + + my $iter = permutations($ar); + while (my $arC = $iter->next) { + push(@r,$arC) if all {$_} slide {_areSquareful($a,$b)} @$arC; + last if (scalar @r && $u); + } + + return @r; +} + +cmp_deeply([squareful(@{[1,17,8]})],[[1,8,17],[17,8,1]]); +cmp_deeply([squareful(@{[2,2,2]})],[[2,2,2]]); + +done_testing; diff --git a/challenge-220/perlboy1967/perl/ch1.pl b/challenge-220/perlboy1967/perl/ch1.pl deleted file mode 100755 index 29be6dc082..0000000000 --- a/challenge-220/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 220 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-220 - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Common Characters -Submitted by: Mohammad S Anwar - -You are given a list of words. - -Write a script to return the list of common characters (sorted alphabeticall) -found in every word of the given list. - -=cut - -use v5.16; - -use common::sense; - -use Test::More; -use Test::Deep qw(cmp_deeply); - -use List::MoreUtils qw(uniq); - -sub commonChars (@) { - my %c; - map { $c{$_}++ } uniq split //,lc for (@_); - sort grep { $c{$_} == scalar @_ } keys %c; -} - -cmp_deeply([commonChars(qw(Perl Rust Raku))],[qw(r)]); -cmp_deeply([commonChars(qw(love live leave))],[qw(e l v)]); -cmp_deeply([commonChars(qw(bamboo bank))],[qw(a b)]); - -done_testing; diff --git a/challenge-220/perlboy1967/perl/ch2.pl b/challenge-220/perlboy1967/perl/ch2.pl deleted file mode 100755 index c31e23c80e..0000000000 --- a/challenge-220/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 220 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-220 - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Squareful -Submitted by: Mohammad S Anwar - -You are given an array of integers, @ints. - -|| An array is squareful if the sum of every pair of adjacent elements is a perfect square. - -Write a script to find all the permutations of the given array that are squareful. - -=cut - -use v5.16; - -use common::sense; - -use Test::More; -use Test::Deep qw(cmp_deeply); - -use List::MoreUtils qw(uniq slide all); -use Algorithm::Combinatorics qw(permutations); - -sub _areSquareful ($$) { - my $s = $_[0] + $_[1]; - state $c = {}; - $c->{$s} //= int($s**0.5) == $s**0.5; - return $c->{$s}; -} - -sub squareful (\@) { - my ($ar,$u,@r) = ($_[0],uniq(@{$_[0]}) == 1); - - my $iter = permutations($ar); - while (my $arC = $iter->next) { - push(@r,$arC) if all {$_} slide {_areSquareful($a,$b)} @$arC; - last if (scalar @r && $u); - } - - return @r; -} - -cmp_deeply([squareful(@{[1,17,8]})],[[1,8,17],[17,8,1]]); -cmp_deeply([squareful(@{[2,2,2]})],[[2,2,2]]); - -done_testing; diff --git a/challenge-220/robert-dicicco/julia/ch-1.jl b/challenge-220/robert-dicicco/julia/ch-1.jl new file mode 100644 index 0000000000..0c1ac773ed --- /dev/null +++ b/challenge-220/robert-dicicco/julia/ch-1.jl @@ -0,0 +1,49 @@ +#!/usr/bin/env julia +#= +------------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-05 +Challenge 220 Task 1 common Characters ( Julia ) +------------------------------------------------ +=# + +using Printf + +words = [["Perl", "Rust", "Raku"], ["love", "live", "leave"]] +alphabet_hash = Dict() + +for wds in words + for c in 'a':'z' + alphabet_hash[c] = 0 + end + @printf("Input: @words = %s\n",wds) + for wd in wds + for ch in lowercase(wd) + alphabet_hash[ch] += 1 + end + end + @printf("Output: ") + # Print the dictionary + for (key, value) in alphabet_hash + if value >= 3 + @printf("%s ",key) + end + end + println("\n") +end + +#= +------------------------------------------------ +julia .\CommonChars.jl + +Input: @words = ["Perl", "Rust", "Raku"] +Output: r + +Input: @words = ["love", "live", "leave"] +Output: e v l +------------------------------------------------ +=# + + + + diff --git a/challenge-220/robert-dicicco/julia/ch-2.jl b/challenge-220/robert-dicicco/julia/ch-2.jl new file mode 100644 index 0000000000..4bbd962ba8 --- /dev/null +++ b/challenge-220/robert-dicicco/julia/ch-2.jl @@ -0,0 +1,59 @@ +#!/usr/bin/env julia +#= +------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-08 +Challenge 220 Task 2 Squareful ( Julia ) +------------------------------------------ +=# +using Printf +using Combinatorics + +myints = [[1,8,17],[1,8,17,19]] + +p=[] + +function IsPerfectSquare(number_to_test) + root = floor(sqrt(number_to_test)) + if ((root ^ 2 ) == number_to_test) + return true; + end + return false; +end + +for intsub in myints + @printf("Input: @ints = %s\n",intsub) + ln = length(intsub) + @printf("Output: ") + global p = collect(permutations(intsub)) + ln = length(intsub) + for perm in p + tv = 1 + flag = 0 + while tv < ln + if IsPerfectSquare(perm[tv] + perm[tv + 1]) + flag += 1 + else + flag = 0 + end + tv += 1 + end + if flag == ln - 1 + @printf("%s ",perm) + end + end + println("\n") +end + +#= +------------------------------------------ +SAMPLE OUTPUT +julia .\Squareful.jl + +Input: @ints = [1, 8, 17] +Output: [1, 8, 17] [17, 8, 1] + +Input: @ints = [1, 8, 17, 19] +Output: [1, 8, 17, 19] [19, 17, 8, 1] +------------------------------------------ +=# diff --git a/challenge-220/robert-dicicco/perl/ch-1.pl b/challenge-220/robert-dicicco/perl/ch-1.pl new file mode 100644 index 0000000000..67cde25402 --- /dev/null +++ b/challenge-220/robert-dicicco/perl/ch-1.pl @@ -0,0 +1,62 @@ +#!/usr/bin/env perl +=begin comment +------------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-05 +Challenge 220 Task 1 common Characters ( Perl ) +------------------------------------------------ +=cut +use strict; +use warnings; +use feature 'say'; + +my @words = (["Perl", "Rust", "Raku"], ["love", "live", "leave"]); + +my $cnt = 0; +my $str = ''; +my %found = (); +my $arrlen = 0; + +for (my $wd = 0; $wd < scalar @words; $wd ++ ) { + $arrlen = scalar @{$words[$wd]}; + $str = join('', "a".."z"); + $cnt = 0; + + my $arrelem = 0; + print("Input: \@words = "); + while($arrelem < $arrlen){ + print("$words[$wd][$arrelem] "); + $arrelem++; + } + print("\n"); + + while ($cnt < length($str)) { + my $ch = substr($str, $cnt++, 1); + if ((lc($words[$wd][0]) =~ /$ch/) and (lc($words[$wd][1]) =~ /$ch/) and (lc($words[$wd][2]) =~ /$ch/)) { + $found{$ch} = 1; + } + } + + my @arr = (); + print("Output: "); + for my $key (keys %found) { + push(@arr,$key); + } + my $str = join(",",sort(@arr)); + print("\($str\)\n\n"); + %found = (); +} + +=begin comment +------------------------------------------------ +SAMPLE OUTPUT +perl .\CommonChars.pl + +Input: @words = Perl Rust Raku +Output: (r) + +Input: @words = love live leave +Output: (e,l,v) +------------------------------------------------ +=cut + diff --git a/challenge-220/robert-dicicco/perl/ch-2.pl b/challenge-220/robert-dicicco/perl/ch-2.pl new file mode 100644 index 0000000000..1b7bdc94b7 --- /dev/null +++ b/challenge-220/robert-dicicco/perl/ch-2.pl @@ -0,0 +1,60 @@ +#!#!/usr/bin/env perl +=begin comment +------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-0-6-07 +Challenge 220 Task 2 Squareful ( Perl ) +------------------------------------------ +=cut +use strict; +use warnings; +use feature 'say'; +use Algorithm::Permute qw/permute/; + +my @ints = (1,8,17); +my $flag = 0; +my $elems = $#ints; + +sub IsPerfectSquare { + my $number_to_test = shift; + my $root = int(sqrt($number_to_test)); + if (($root ** 2 ) == $number_to_test) { + return 1; + } + return undef; +} + +say "Input: \@ints = @ints"; + +# print all permutations of @ints +print("Output: "); +my $p = Algorithm::Permute->new(\@ints); +while ( my @perm = $p->next ) { + for (my $tv = 0; $tv < $#perm; $tv++) { + if (IsPerfectSquare($perm[$tv] + $perm[$tv+1])) { + $flag += 1; + } else { + $flag = 0; + } + } + + if ($flag == $elems) { + print("(@perm) "); + } + $flag = 0; +} + +print("\n"); + +=begin comment +------------------------------------------ +SAMPLE OUTPUT +perl .\Squareful.pl + +Input: @ints = 1 8 17 +Output: (17 8 1) (1 8 17) + +Input: @ints = 1 8 17 19 +Output: (19 17 8 1) (1 8 17 19) +------------------------------------------ +=cut diff --git a/challenge-220/robert-dicicco/python/ch-1.py b/challenge-220/robert-dicicco/python/ch-1.py new file mode 100644 index 0000000000..632e169c46 --- /dev/null +++ b/challenge-220/robert-dicicco/python/ch-1.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# ------------------------------------------------ +# AUTHOR: Robert DiCicco +# DATE : 2023-06-05 +# Challenge 220 Task 1 common Characters ( Python ) +# ------------------------------------------------ + +words = [["Perl", "Rust", "Raku"], ["love", "live", "leave"]] + +alphabet_hash = {} + +for wds in words: + for char in range(ord('a'), ord('z')+1): + alphabet_hash[chr(char)] = 0 + + print("Input: @words = ",wds) + for wd in wds: + wd = wd.lower() + for ch in wd: + alphabet_hash[ch] += 1 + + print("Output: ",end= " ") + for i in alphabet_hash: + if alphabet_hash[i] >= 3: + print(i,end=" ") + print("\n") + +# ------------------------------------------------ +# SAMPLE OUTPUT +# python .\CommonChars.py + +# Input: @words = ['Perl', 'Rust', 'Raku'] +# Output: r + +# Input: @words = ['love', 'live', 'leave'] +# Output: e l v + +# ------------------------------------------------ diff --git a/challenge-220/robert-dicicco/python/ch-2.py b/challenge-220/robert-dicicco/python/ch-2.py new file mode 100644 index 0000000000..550194cb55 --- /dev/null +++ b/challenge-220/robert-dicicco/python/ch-2.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# ------------------------------------------ +# AUTHOR: Robert DiCicco +# DATE : 2023-06-00 +# Challenge 220 Task 2 Squareful ( Python ) +# ------------------------------------------ +import math +from itertools import permutations + + +myints = [[1,8,17],[1,8,17,19]] + +def IsPerfectSquare(number_to_test) : + root = math.floor(math.sqrt(number_to_test)) + if ((root ** 2 ) == number_to_test) : + return True; + return False; + +for intsub in myints: + print("Input: @ints = ",intsub) + print("OutPut: ",end="") + perm = permutations(intsub) + for i in list(perm): + ln = len(i) - 1 + tv = 0 + flag = 0 + while tv < ln : + if IsPerfectSquare(i[tv] + i[tv + 1]) : + flag += 1 + else : + flag = 0 + tv += 1 + if flag == ln - 1 : + print(i,end=" ") + print("\n") + +#------------------------------------------ +# SAMPLE OUTPUT +# python .\Squareful.py + +# Input: @ints = [1, 8, 17] +# OutPut: (1, 17, 8) (17, 1, 8) + +# Input: @ints = [1, 8, 17, 19] +# OutPut: (1, 19, 17, 8) (19, 1, 8, 17) +#------------------------------------------ + + + diff --git a/challenge-220/robert-dicicco/raku/ch-1.raku b/challenge-220/robert-dicicco/raku/ch-1.raku new file mode 100644 index 0000000000..4180a77bd3 --- /dev/null +++ b/challenge-220/robert-dicicco/raku/ch-1.raku @@ -0,0 +1,59 @@ +#!/usr/bin/env raku +=begin comment +------------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-05 +Challenge 220 Task 1 common Characters ( Raku ) +------------------------------------------------ +=end comment + +use v6; + +my @words = , ; + +my $str = join('', "a".."z"); + +for (@words) -> @wds { + say "Input: \@words = ", @wds; + my $sz = @wds.elems; # number of words in each entry + my $cnt = 0; + my %found = (); # hash to hold results + my @out = (); # array to hold output; + while $cnt < $sz { # for each one of the word entries + my $strcnt = 0; + while $strcnt < $str.chars { + my $ch = substr($str, $strcnt++,1); + my $arrch = lc(join('',@wds[$cnt])); + if $arrch.contains($ch) { # check to see if entry holds character + if defined %found{$ch} { # bump its count + %found{$ch}++ + } else { + %found{$ch} = 1; # add it to the hash array + } + } + } + $cnt++; # get next word + } + for %found.kv -> $k, $v { # for keys, values in hash + @out.push: $k if $v == $sz; # push the key to @out array if in all words + } + say "Output: ",@out.sort; # and say the results + say " "; +} + +=begin comment +------------------------------------------------ +SAMPLE OUTPUT +raku .\CommonChars.rk + +Input: @words = (Perl Rust Raku) +Output: (r) + +Input: @words = (love live leave) +Output: (e l v) + +------------------------------------------------ +=end comment + + + diff --git a/challenge-220/robert-dicicco/raku/ch-2.raku b/challenge-220/robert-dicicco/raku/ch-2.raku new file mode 100644 index 0000000000..4010124aa4 --- /dev/null +++ b/challenge-220/robert-dicicco/raku/ch-2.raku @@ -0,0 +1,43 @@ +#!/usr/bin/env raku +use v6; +=begin comment +------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-08 +Challenge 220 Task 2 Squareful ( Raku ) +------------------------------------------ +=end comment + +my @ints = <1 8 17>,<1 8 17 19>; + +sub IsPerfectSquare($number_to_test) { + my $root = $number_to_test.sqrt.Int; + if (($root ** 2 ) == $number_to_test) { + return True; + } + return False; +} + +for (@ints) -> @intsub { + say "Input: \@ints = ",@intsub; + print("Output: "); + for (@intsub.permutations) -> @perm { + my $tv = 0; + my $flag = 0; + while $tv < @intsub.elems - 1 { + if (IsPerfectSquare(@perm[$tv] + @perm[$tv+1])) { + $flag += 1; + } else { + $flag = 0; + } + $tv++; + } + if ($flag == (@intsub.elems - 1)) { + print("(" ~ @perm ~ ") "); + } + } + print("\n\n"); +} + + + diff --git a/challenge-220/robert-dicicco/ruby/ch-1.rb b/challenge-220/robert-dicicco/ruby/ch-1.rb new file mode 100644 index 0000000000..d825f52ca7 --- /dev/null +++ b/challenge-220/robert-dicicco/ruby/ch-1.rb @@ -0,0 +1,51 @@ +#!/usr/bin/env ruby +=begin +------------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-05 +Challenge 220 Task 1 common Characters ( Ruby ) +------------------------------------------------ +=end + +words = [["Perl", "Rust", "Raku"], ["love", "live", "leave"]]; + +str = ('a' .. 'z') + +alphabet_hash = {} + +words.each do |wds| + str.each do |letter| + alphabet_hash[letter] = 0 + end + puts("Input: @words = #{wds}") + wds.each do |wd| + wd = wd.downcase + myarr = wd.chars + myarr.each do |ch| + total = alphabet_hash[ch].to_i + total += 1 + alphabet_hash[ch] = total + end + end + print("Output : (") + alphabet_hash.each do |key, val| + if val >= 3 + print("#{key} ") + end + end + print(")\n\n") +end + +=begin +------------------------------------------------ +SAMPLE OUTPUT +ruby .\CommomChars.rb + +Input: @words = ["Perl", "Rust", "Raku"] +Output : (r ) + +Input: @words = ["love", "live", "leave"] +Output : (e l v ) +------------------------------------------------ +=end + diff --git a/challenge-220/robert-dicicco/ruby/ch-2.rb b/challenge-220/robert-dicicco/ruby/ch-2.rb new file mode 100644 index 0000000000..94ad139cdf --- /dev/null +++ b/challenge-220/robert-dicicco/ruby/ch-2.rb @@ -0,0 +1,56 @@ +#!/usr/bin/env ruby +=begin +------------------------------------------ +AUTHOR: Robert DiCicco +DATE : 2023-06-08 +Challenge 220 Task 2 Squareful ( Ruby ) +------------------------------------------ +=end + +myints = [[1,8,17],[1,8,17,19]]; + +def IsPerfectSquare(number_to_test) + root = Math.sqrt(number_to_test).to_i + if ((root ** 2 ) == number_to_test) + return true; + end + return false; +end + +$pm = [] + +myints.each do |intsub| + puts("Input: @ints = #{intsub}") + ln = intsub.length() + print("Output: ") + intsub.permutation(ln).to_a.each do |perm| + tv = 0 + $flag = 0 + while tv < (ln - 1) + if IsPerfectSquare(perm[tv] + perm[tv + 1]) + $flag += 1 + else + $flag = 0 + end + tv += 1 + end + if $flag == ln - 1 + print("#{perm} ") + end + end + + print("\n\n") +end + +=begin +------------------------------------------ +SAMPLE OUTPUT +ruby .\Squareful.rb + +Input: @ints = [1, 8, 17] +Output: [1, 8, 17] [17, 8, 1] + +Input: @ints = [1, 8, 17, 19] +Output: [1, 8, 17, 19] [19, 17, 8, 1] +------------------------------------------ +=end diff --git a/challenge-220/ulrich-rieke/cpp/ch-1.cpp b/challenge-220/ulrich-rieke/cpp/ch-1.cpp new file mode 100644 index 0000000000..2e9048a31d --- /dev/null +++ b/challenge-220/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,55 @@ +#include +#include +#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 words, separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector entered ( split( line , " " ) ) ; + int len = entered.size( ) ; + std::vector allLower ; + for ( auto s : entered ) { + std::transform( s.begin( ) , s.end( ) , s.begin( ) , tolower ) ; + allLower.push_back( s ) ; + } + std::set old_intersection ; + for ( char c : allLower[ 0 ] ) + old_intersection.insert( c ) ; + if ( len == 1 ) { + } + else { + std::set new_intersection ; + for ( int i = 1 ; i < len ; i++ ) { + std::set wordSet ; + for ( char c : allLower[ i ] ) + wordSet.insert( c ) ; + std::set_intersection( old_intersection.begin( ) , + old_intersection.end( ) , wordSet.begin( ) , wordSet.end( ) , + std::inserter( new_intersection , new_intersection.begin( ) ) ) ; + old_intersection = new_intersection ; + } + std::cout << "( " ; + std::copy( old_intersection.begin( ) , old_intersection.end( ) , + std::ostream_iterator( std::cout , " " )) ; + std::cout << ")" << std::endl ; + } + return 0 ; +} diff --git a/challenge-220/ulrich-rieke/cpp/ch-2.cpp b/challenge-220/ulrich-rieke/cpp/ch-2.cpp new file mode 100644 index 0000000000..d8dac8ff9f --- /dev/null +++ b/challenge-220/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,69 @@ +#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 ; +} + +bool condition( const std::vector & subarray ) { + for ( int i = 0 ; i < subarray.size( ) - 1 ; i++ ) { + int sum = subarray[ i ] + subarray[ i + 1 ] ; + double root = std::sqrt( static_cast(sum) ) ; + int rootint = static_cast(std::floor( root ) ) ; + if ( rootint * rootint != sum ) { + return false ; + } + } + return true ; +} + +int main( ) { + std::cout << "Please enter some integers, separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector numberstrings ( split( line , " " ) ) ; + std::vector numbers ; + for ( auto s : numberstrings ) { + numbers.push_back( std::stoi( s ) ) ; + } + std::sort( numbers.begin( ) , numbers.end( ) ) ; + std::vector> solution ; + if ( condition( numbers ) ) { + solution.push_back( numbers ) ; + } + while ( std::next_permutation( numbers.begin( ) , numbers.end( ) ) ) { + if ( condition ( numbers ) ) { + solution.push_back( numbers ) ; + } + } + std::cout << "(" ; + if ( solution.size( ) == 0 ) { + std::cout << "())\n" ; + } + else { + for ( auto seq : solution ) { + std::cout << "(" ; + for ( int i : seq ) { + std::cout << i << " "; + } + std::cout << ")" ; + if ( seq != solution.back( ) ) { + std::cout << "," ; + } + } + std::cout << ")\n" ; + } + return 0 ; +} diff --git a/challenge-220/ulrich-rieke/haskell/ch-1.hs b/challenge-220/ulrich-rieke/haskell/ch-1.hs new file mode 100644 index 0000000000..3cb0cdf4d4 --- /dev/null +++ b/challenge-220/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,13 @@ +module Challenge220 + where +import qualified Data.Set as S +import Data.Char (toLower) + +solution :: [String] -> [Char] +solution = S.toList . foldl1 S.intersection . map ( S.fromList . map toLower ) + +main :: IO ( ) +main = do + putStrLn "Enter some strings, separated by blanks!" + line <- getLine + print $ solution $ words line diff --git a/challenge-220/ulrich-rieke/haskell/ch-2.hs b/challenge-220/ulrich-rieke/haskell/ch-2.hs new file mode 100644 index 0000000000..7e25ae3931 --- /dev/null +++ b/challenge-220/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,22 @@ +module Challenge220_2 + where +import Data.List.Split ( divvy ) +import Data.List ( permutations ) + +isRootNumber :: Int -> Bool +isRootNumber n = rootint * rootint == n +where + rootint :: Int + rootint = floor $ sqrt $ fromIntegral n + +condition :: [Int] -> Bool +condition = all isRootNumber . map sum . divvy 2 1 + +solution :: [Int] -> [[Int]] +solution = filter condition . permutations + +main :: IO ( ) +main = do + putStrLn "Enter some integers, separated by blanks!" + numbers <- getLine + print $ solution $ map read $ words numbers diff --git a/challenge-220/ulrich-rieke/perl/ch-1.pl b/challenge-220/ulrich-rieke/perl/ch-1.pl new file mode 100644 index 0000000000..887573d415 --- /dev/null +++ b/challenge-220/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +say "Enter some words, separated by blanks!" ; +my $line = ; +chomp $line ; +my @words = split( /\s/ , $line ) ; +my @allLower = map { lc $_ } @words ; +my $len = scalar( @words ) ; +my %lettercount ; +for my $letter ( split( // , $allLower[ 0 ] ) ) { + $lettercount{$letter}++ ; +} +if ( $len == 1 ) { + say "(" . join( ',' , sort { $a cmp $b } keys %lettercount ) . ")" ; +} +else { + my @old_intersection = keys %lettercount ; + for my $i ( 1..$len - 1 ) { + my @new_intersection ; + for my $letter ( @old_intersection ) { + if ( index( $allLower[ $i ] , $letter ) > -1 ) { + push @new_intersection , $letter ; + } + } + @old_intersection = @new_intersection ; + } + say "(" . join( ',' , sort { $a cmp $b } @old_intersection ) . ")" ; +} diff --git a/challenge-220/ulrich-rieke/perl/ch-2.pl b/challenge-220/ulrich-rieke/perl/ch-2.pl new file mode 100644 index 0000000000..39529303c0 --- /dev/null +++ b/challenge-220/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,34 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use Algorithm::Combinatorics qw( permutations ) ; +use POSIX ; + +sub condition { + my $permu = shift ; + my $len = shift ; + for my $i (0..scalar( @{$permu} ) - 2 ) { + my $sum = $permu->[ $i ] + $permu->[ $i + 1 ] ; + my $root = sqrt( $sum ) ; + my $rootint = floor( $root ) ; + if ( $rootint * $rootint != $sum ) { + return 0 ; + } + } + return 1 ; +} + +say "Enter some integers, separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my $len = scalar( @numbers ) ; +my $iter = permutations( \@numbers ) ; +print "(" ; +while ( my $c = $iter->next ) { + if ( condition( $c , $len ) ) { + print "(" . join( ',' , @$c ) . ") " ; + } +} +say ")" ; diff --git a/challenge-220/ulrich-rieke/raku/ch-1.raku b/challenge-220/ulrich-rieke/raku/ch-1.raku new file mode 100644 index 0000000000..1e95360398 --- /dev/null +++ b/challenge-220/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,8 @@ +use v6 ; + +say "Enter some words, separated by blanks!" ; +my $line = $*IN.get ; +my @words = $line.words.map( {$_.lc} ) ; +my @wordSets = @words.map( { $_.comb.Set } ) ; +my $intersection = [(&)] @wordSets ; +say "(" ~ $intersection.keys.sort ~ ")" ; diff --git a/challenge-220/ulrich-rieke/raku/ch-2.raku b/challenge-220/ulrich-rieke/raku/ch-2.raku new file mode 100644 index 0000000000..e5eff7f36b --- /dev/null +++ b/challenge-220/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,28 @@ +use v6 ; + +sub condition( $aSeq , $len ) { + for (0..$len - 2 ) -> $i { + my $sum = $aSeq[ $i ] + $aSeq[ $i + 1 ] ; + my $rootint = $sum.sqrt( ).floor( ) ; + if ( $rootint * $rootint != $sum ) { + return False ; + } + } + return True ; +} + +sub printSeq( $aSeq ) { + print "(" ~ join( ',' , $aSeq.Array ) ~ ")" ; +} + +say "Enter some integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my $len = @numbers.elems ; +my @permus = @numbers.permutations( ) ; +my @solution = @permus.grep( {condition( $_ , $len) } ) ; +print "(" ; +for @solution -> $seq { + printSeq( $seq ) ; +} +say ")" ; diff --git a/challenge-220/ulrich-rieke/rust/ch-1.rs b/challenge-220/ulrich-rieke/rust/ch-1.rs new file mode 100644 index 0000000000..1720b4dfdf --- /dev/null +++ b/challenge-220/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,39 @@ +use std::io ; +use std::collections::HashSet ; + +fn main() { + println!("Enter some words, separated by blanks!") ; + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let mut char_sets : Vec> = Vec::new( ) ; + entered_line.split_whitespace( ).map ( | s | s.trim( ) ). + for_each( | s | { + let mut word_chars : HashSet = HashSet::new( ) ; + for c in s.chars( ) { + word_chars.insert( c.to_ascii_lowercase( ) ) ; + } + char_sets.push( word_chars ) + } + ) ; + let len = char_sets.len( ) ; + let mut all_chars : Vec = Vec::new( ) ; + if len == 1 { + char_sets[0].iter( ).for_each( | m | all_chars.push( *m ) ) ; + } + else { + let mut old_intersection : HashSet = char_sets[0].clone( ) ; + for i in 1..len { + let mut new_intersection : HashSet = HashSet::new( ) ; + for c in old_intersection.intersection( &char_sets[ i ] ) { + new_intersection.insert( *c ) ; + } + old_intersection = new_intersection ; + } + for c in old_intersection.iter( ) { + all_chars.push( *c ) ; + } + } + all_chars.sort( ) ; + println!("{:?}" , all_chars) ; +} diff --git a/challenge-220/ulrich-rieke/rust/ch-2.rs b/challenge-220/ulrich-rieke/rust/ch-2.rs new file mode 100644 index 0000000000..bb6e29c9a1 --- /dev/null +++ b/challenge-220/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,24 @@ +use std::io ; +use itertools::Itertools ; + +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 len : usize = numbers.len( ) ; + let mut possible_solutions : Vec> = Vec::new( ) ; + for v in numbers.into_iter( ).permutations( len ) { + if (0..len - 1 ).into_iter( ).all( | i | { + let sum : i32 = &v[ i ] + &v[ i + 1 ] ; + let rootint : i32 = (sum as f64 ).sqrt( ).floor( ) as i32 ; + sum == rootint * rootint + } + ) { + possible_solutions.push( v ) ; + } + } + println!("{:?}" , possible_solutions ) ; +} diff --git a/members.json b/members.json index 4f6c172369..637fb0270a 100644 --- a/members.json +++ b/members.json @@ -124,6 +124,7 @@ "joe-tym" : "Joe Tym", "jokraft" : "Jan Ole Kraft", "john-barrett" : "John Barrett", + "john-horner" : "John Horner", "juan-caballero" : "Juan Caballero", "julien-fiegehenn" : "Julien Fiegehenn", "kai-burgdorf" : "Kai Burgdorf", diff --git a/stats/pwc-challenge-216.json b/stats/pwc-challenge-216.json index 27723919f8..5f92c2b501 100644 --- a/stats/pwc-challenge-216.json +++ b/stats/pwc-challenge-216.json @@ -1,13 +1,202 @@ { - "title" : { - "text" : "The Weekly Challenge - 216" + "subtitle" : { + "text" : "[Champions: 32] Last updated at 2023-06-12 04:11:27 GMT" }, + "series" : [ + { + "name" : "The Weekly Challenge - 216", + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Arne Sommer", + "y" : 3, + "name" : "Arne Sommer" + }, + { + "y" : 3, + "drilldown" : "Avery Adams", + "name" : "Avery Adams" + }, + { + "name" : "BarrOff", + "y" : 1, + "drilldown" : "BarrOff" + }, + { + "y" : 2, + "drilldown" : "Bruce Gray", + "name" : "Bruce Gray" + }, + { + "y" : 2, + "drilldown" : "David Ferrone", + "name" : "David Ferrone" + }, + { + "y" : 2, + "drilldown" : "Duncan C. White", + "name" : "Duncan C. White" + }, + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Feng Chang", + "name" : "Feng Chang" + }, + { + "drilldown" : "Flavio Poletti", + "y" : 6, + "name" : "Flavio Poletti" + }, + { + "drilldown" : "Jaldhar H. Vyas", + "y" : 5, + "name" : "Jaldhar H. Vyas" + }, + { + "drilldown" : "James Smith", + "y" : 3, + "name" : "James Smith" + }, + { + "name" : "Jan Krnavek", + "y" : 1, + "drilldown" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "y" : 1, + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld", + "y" : 3 + }, + { + "name" : "Leo Manfredi", + "y" : 1, + "drilldown" : "Leo Manfredi" + }, + { + "y" : 2, + "drilldown" : "Lubos Kolouch", + "name" : "Lubos Kolouch" + }, + { + "y" : 8, + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "name" : "Matthias Muth", + "drilldown" : "Matthias Muth", + "y" : 2 + }, + { + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke", + "y" : 1 + }, + { + "name" : "Paulo Custodio", + "y" : 2, + "drilldown" : "Paulo Custodio" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "name" : "RibTips", + "y" : 2, + "drilldown" : "RibTips" + }, + { + "y" : 3, + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley" + }, + { + "drilldown" : "Robert DiCicco", + "y" : 2, + "name" : "Robert DiCicco" + }, + { + "drilldown" : "Roger Bell_West", + "y" : 5, + "name" : "Roger Bell_West" + }, + { + "name" : "Shimon Bollinger", + "y" : 2, + "drilldown" : "Shimon Bollinger" + }, + { + "name" : "Simon Green", + "y" : 3, + "drilldown" : "Simon Green" + }, + { + "name" : "Solathian", + "drilldown" : "Solathian", + "y" : 1 + }, + { + "y" : 4, + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "drilldown" : "Ulrich Rieke", + "y" : 3, + "name" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + } + ] + } + ], "legend" : { "enabled" : 0 }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 + }, + "title" : { + "text" : "The Weekly Challenge - 216" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "xAxis" : { + "type" : "category" + }, "drilldown" : { "series" : [ { + "id" : "Arne Sommer", "name" : "Arne Sommer", "data" : [ [ @@ -18,10 +207,10 @@ "Blog", 1 ] - ], - "id" : "Arne Sommer" + ] }, { + "name" : "Avery Adams", "id" : "Avery Adams", "data" : [ [ @@ -32,28 +221,27 @@ "Blog", 2 ] - ], - "name" : "Avery Adams" + ] }, { - "name" : "BarrOff", "data" : [ [ "Raku", 1 ] ], + "name" : "BarrOff", "id" : "BarrOff" }, { - "id" : "Bruce Gray", "data" : [ [ "Raku", 2 ] ], - "name" : "Bruce Gray" + "name" : "Bruce Gray", + "id" : "Bruce Gray" }, { "data" : [ @@ -76,18 +264,18 @@ "id" : "Duncan C. White" }, { + "id" : "E. Choroba", + "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ], - "name" : "E. Choroba", - "id" : "E. Choroba" + ] }, { - "id" : "Feng Chang", "name" : "Feng Chang", + "id" : "Feng Chang", "data" : [ [ "Raku", @@ -97,6 +285,7 @@ }, { "name" : "Flavio Poletti", + "id" : "Flavio Poletti", "data" : [ [ "Perl", @@ -110,8 +299,7 @@ "Blog", 2 ] - ], - "id" : "Flavio Poletti" + ] }, { "data" : [ @@ -128,10 +316,12 @@ 1 ] ], - "name" : "Jaldhar H. Vyas", - "id" : "Jaldhar H. Vyas" + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" }, { + "name" : "James Smith", + "id" : "James Smith", "data" : [ [ "Perl", @@ -141,23 +331,21 @@ "Blog", 1 ] - ], - "name" : "James Smith", - "id" : "James Smith" + ] }, { - "id" : "Jan Krnavek", "data" : [ [ "Raku", 1 ] ], + "id" : "Jan Krnavek", "name" : "Jan Krnavek" }, { - "id" : "Jorg Sommrey", "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey", "data" : [ [ "Perl", @@ -166,7 +354,6 @@ ] }, { - "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -181,30 +368,30 @@ 1 ] ], - "id" : "Laurent Rosenfeld" + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" }, { + "name" : "Leo Manfredi", + "id" : "Leo Manfredi", "data" : [ [ "Perl", 1 ] - ], - "name" : "Leo Manfredi", - "id" : "Leo Manfredi" + ] }, { "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] - ], - "id" : "Lubos Kolouch" + ] }, { - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -215,7 +402,8 @@ 6 ] ], - "name" : "Luca Ferrari" + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" }, { "data" : [ @@ -228,24 +416,34 @@ "id" : "Mark Anderson" }, { - "name" : "Matthias Muth", "data" : [ [ "Perl", 2 ] ], + "name" : "Matthias Muth", "id" : "Matthias Muth" }, { + "name" : "Niels van Dijke", "id" : "Niels van Dijke", "data" : [ [ "Perl", 1 ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] ], - "name" : "Niels van Dijke" + "id" : "Paulo Custodio", + "name" : "Paulo Custodio" }, { "id" : "Peter Campbell Smith", @@ -262,18 +460,16 @@ ] }, { + "name" : "RibTips", + "id" : "RibTips", "data" : [ [ "Perl", 2 ] - ], - "name" : "RibTips", - "id" : "RibTips" + ] }, { - "id" : "Robbie Hatley", - "name" : "Robbie Hatley", "data" : [ [ "Perl", @@ -283,9 +479,13 @@ "Blog", 1 ] - ] + ], + "name" : "Robbie Hatley", + "id" : "Robbie Hatley" }, { + "name" : "Robert DiCicco", + "id" : "Robert DiCicco", "data" : [ [ "Perl", @@ -295,11 +495,10 @@ "Raku", 1 ] - ], - "name" : "Robert DiCicco", - "id" : "Robert DiCicco" + ] }, { + "name" : "Roger Bell_West", "id" : "Roger Bell_West", "data" : [ [ @@ -314,11 +513,9 @@ "Blog", 1 ] - ], - "name" : "Roger Bell_West" + ] }, { - "id" : "Shimon Bollinger", "data" : [ [ "Raku", @@ -329,10 +526,10 @@ 1 ] ], + "id" : "Shimon Bollinger", "name" : "Shimon Bollinger" }, { - "name" : "Simon Green", "data" : [ [ "Perl", @@ -343,6 +540,7 @@ 1 ] ], + "name" : "Simon Green", "id" : "Simon Green" }, { @@ -352,10 +550,12 @@ 1 ] ], - "name" : "Solathian", - "id" : "Solathian" + "id" : "Solathian", + "name" : "Solathian" }, { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", "data" : [ [ "Perl", @@ -365,13 +565,9 @@ "Blog", 2 ] - ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + ] }, { - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -381,9 +577,13 @@ "Raku", 1 ] - ] + ], + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke" }, { + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -393,201 +593,16 @@ "Blog", 1 ] - ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + ] } ] }, "chart" : { "type" : "column" }, - "subtitle" : { - "text" : "[Champions: 31] Last updated at 2023-05-16 11:28:38 GMT" - }, "yAxis" : { "title" : { "text" : "Total Solutions" } - }, - "tooltip" : { - "headerFormat" : "{series.name}
", - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } - } - }, - "series" : [ - { - "colorByPoint" : 1, - "data" : [ - { - "name" : "Arne Sommer", - "y" : 3, - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Avery Adams", - "y" : 3, - "name" : "Avery Adams" - }, - { - "name" : "BarrOff", - "y" : 1, - "drilldown" : "BarrOff" - }, - { - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray", - "y" : 2 - }, - { - "name" : "David Ferrone", - "y" : 2, - "drilldown" : "David Ferrone" - }, - { - "name" : "Duncan C. White", - "y" : 2, - "drilldown" : "Duncan C. White" - }, - { - "drilldown" : "E. Choroba", - "y" : 2, - "name" : "E. Choroba" - }, - { - "drilldown" : "Feng Chang", - "name" : "Feng Chang", - "y" : 2 - }, - { - "y" : 6, - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti" - }, - { - "drilldown" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas", - "y" : 5 - }, - { - "drilldown" : "James Smith", - "y" : 3, - "name" : "James Smith" - }, - { - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek", - "y" : 1 - }, - { - "name" : "Jorg Sommrey", - "y" : 1, - "drilldown" : "Jorg Sommrey" - }, - { - "drilldown" : "Laurent Rosenfeld", - "y" : 3, - "name" : "Laurent Rosenfeld" - }, - { - "drilldown" : "Leo Manfredi", - "y" : 1, - "name" : "Leo Manfredi" - }, - { - "drilldown" : "Lubos Kolouch", - "y" : 2, - "name" : "Lubos Kolouch" - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 8 - }, - { - "name" : "Mark Anderson", - "y" : 2, - "drilldown" : "Mark Anderson" - }, - { - "drilldown" : "Matthias Muth", - "name" : "Matthias Muth", - "y" : 2 - }, - { - "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke", - "y" : 1 - }, - { - "drilldown" : "Peter Campbell Smith", - "y" : 3, - "name" : "Peter Campbell Smith" - }, - { - "name" : "RibTips", - "y" : 2, - "drilldown" : "RibTips" - }, - { - "name" : "Robbie Hatley", - "y" : 3, - "drilldown" : "Robbie Hatley" - }, - { - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco", - "y" : 2 - }, - { - "name" : "Roger Bell_West", - "y" : 5, - "drilldown" : "Roger Bell_West" - }, - { - "name" : "Shimon Bollinger", - "y" : 2, - "drilldown" : "Shimon Bollinger" - }, - { - "name" : "Simon Green", - "y" : 3, - "drilldown" : "Simon Green" - }, - { - "name" : "Solathian", - "y" : 1, - "drilldown" : "Solathian" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" - }, - { - "y" : 3, - "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - } - ], - "name" : "The Weekly Challenge - 216" - } - ], - "xAxis" : { - "type" : "category" } } diff --git a/stats/pwc-challenge-217.json b/stats/pwc-challenge-217.json index 00c4cf1153..55f62fa8ea 100644 --- a/stats/pwc-challenge-217.json +++ b/stats/pwc-challenge-217.json @@ -1,226 +1,15 @@ { - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1, - "headerFormat" : "{series.name}
" - }, - "series" : [ - { - "data" : [ - { - "y" : 4, - "drilldown" : "Ali Moradi", - "name" : "Ali Moradi" - }, - { - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer", - "y" : 3 - }, - { - "y" : 2, - "name" : "Athanasius", - "drilldown" : "Athanasius" - }, - { - "y" : 3, - "drilldown" : "Avery Adams", - "name" : "Avery Adams" - }, - { - "name" : "BarrOff", - "drilldown" : "BarrOff", - "y" : 3 - }, - { - "name" : "Bob Lied", - "drilldown" : "Bob Lied", - "y" : 2 - }, - { - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray", - "y" : 5 - }, - { - "y" : 2, - "name" : "David Ferrone", - "drilldown" : "David Ferrone" - }, - { - "drilldown" : "Duncan C. White", - "name" : "