The Weekly Challenge - 163

Monday, May 2, 2022| Tags: Perl, Raku

TABLE OF CONTENTS


01. HEADLINES

02. SPONSOR

03. RECAP

04. PERL REVIEW

05. RAKU REVIEW

06. CHART

07. NEW MEMBERS

08. GUESTS

09. TASK #1: Sum Bitwise Operator

10. TASK #2: Summations


HEADLINES


We are celebrating Idd today in England. Happy Idd to all the members of Team PWC.

Today is also the first Monday of the month, Time to declare the next champion. With great pleasure, we declare Matthew Neleigh as our next champion. He is currently ranked #50 in the leader board with 37 contributions in Perl and total score of 74.

We got back to back contributions by Ryan Thompson and Julien Fiegehenn. Thank you.

Lets keep the momentum going together.


Blogs with Creative Title


1. Thirteen Wheatstones by Arne Sommer.

2. Magic Spell Books, or 13 Revisited by Colin Crain.

3. Fair Play with Your Nose to the Grindstone by Colin Crain.

4. Play Fair and By The Book by Dave Jacoby.

5. Playing Fair with ISBNs by Roger Bell_West.

6. Checksums and early encryption by Peter Campbell Smith.


GitHub Repository Stats


1. Commits: 24,914 (+164)

2. Pull Requests: 6,031 (+42)

3. Contributors: 191 (+2)

4. Fork: 247 (+1)

5. Stars: 129



Our solo sponsor Pete Sergeant has been a great support to keep us motivated. We are lucky that he agreed to continue the journey with us in the year 2022. I would like to personally thank Pete and his entire team for their generosity. It would be great if we could add few more to sponsor the prize money so that we could go back and declare weekly champions as we have done in the past. I hope and wish this will become possible in 2022. The amount doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If an organisation comes forward and supports us then that would be the ultimate achievement.


RECAP


Quick recap of The Weekly Challenge - 162 by Mohammad S Anwar.


PERL REVIEW


Please check out Perl solutions review of The Weekly Challenge - 158 by Colin Crain.

If you missed any past reviews then please check out the collection.


RAKU REVIEW


If you missed any past reviews then please check out the collection.


CHART


Please take a look at the charts showing interesting data.

I would like to THANK every member of the team for their valuable suggestions. Please do share your experience with us.


NEW MEMBERS


Please find out How to contribute?, if you have any doubts.

Please try the excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.


GUESTS


Please checkout the guest contributions for the Week #162.

Please find past solutions by respected guests. Please share your creative solutions in other languages.


Task 1: Sum Bitwise Operator

Submitted by: Mohammad S Anwar

You are given list positive numbers, @n.

Write script to calculate the sum of bitwise & operator for all unique pairs.

Example 1
Input: @n = (1, 2, 3)
Output: 3

Since (1 & 2) + (2 & 3) + (1 & 3) => 0 + 2 + 1 =>  3.
Example 2
Input: @n = (2, 3, 4)
Output: 2

Since (2 & 3) + (2 & 4) + (3 & 4) => 2 + 0 + 0 =>  2.

Task 2: Summations

Submitted by: Mohammad S Anwar

You are given a list of positive numbers, @n.

Write a script to find out the summations as described below.

Example 1
Input: @n = (1, 2, 3, 4, 5)
Output: 42

    1 2 3  4  5
      2 5  9 14
        5 14 28
          14 42
             42

The nth Row starts with the second element of the (n-1)th row.
The following element is sum of all elements except first element of previous row.
You stop once you have just one element in the row.
Example 2
Input: @n = (1, 3, 5, 7, 9)
Output: 70

    1 3  5  7  9
      3  8 15 24
         8 23 47
           23 70
              70


Last date to submit the solution 23:59 (UK Time) Sunday 8th May 2022.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me