The Weekly Challenge - 109

Monday, Apr 19, 2021| 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: Chowla Numbers

10. TASK #2: Four Squares Puzzle


HEADLINES


First thing first, please accept my apology for the delay.

This is the first weekly challenge in the month of Ramadan 2021. My routine plan went for a toss. I should have been more prepared to the new routine because of Ramadan. Never mind, lesson learnt.

We have a new member, Lakpa Tashi Bhutia, joining the Team PWC. In the first week itself, he has already shared solutions to the following weeks in Perl.

Week #001

Week #002

Week #003

Week #004

Week #005

Week #006

Week #007

Week #008

Week #009

Week #010

Week #011

Well done, Lakpa.

As we all know, contributions in guest languages is on the rise. Pete Houston helped us this week with contributions in C, Fortran and Python for the first time.


Mohammad Anwar: Locate Memory




Mohammad Anwar: Bell Numbers




Let us share some interesting stats from the GitHub repository.

1. Commits: 15,986 (+183)

2. Pull Requests: 3,914 (+45)

3. Contributors: 163 (+1)

4. Fork: 205 (+1)

5. Stars: 91


Last but not least, I would like to thank each and every member for their support and encouragement.



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 2021. 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 2021. 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 - 108” by Mohammad S Anwar.


PERL REVIEW


Please check out Perl solutions review of the “Perl Weekly Challenge - 106” 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


Lakpa Tashi Bhutia, an experienced Perl hacker joined the team.

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 #108.

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


TASK #1 › Chowla Numbers

Submitted by: Mohammad S Anwar

Write a script to generate first 20 Chowla Numbers, named after, Sarvadaman D. S. Chowla, a London born Indian American mathematician. It is defined as:

C(n) = sum of divisors of n except 1 and n
NOTE: Updated the above definition as suggested by Abigail [2021/04/19 18:40].

Output:

0, 0, 0, 2, 0, 5, 0, 6, 3, 7, 0, 15, 0, 9, 8, 14, 0, 20, 0, 21

TASK #2 › Four Squares Puzzle

Submitted by: Mohammad S Anwar

You are given four squares as below with numbers named a,b,c,d,e,f,g.

              (1)                    (3)
        ╔══════════════╗      ╔══════════════╗
        ║              ║      ║              ║
        ║      a       ║      ║      e       ║
        ║              ║ (2)  ║              ║  (4)
        ║          ┌───╫──────╫───┐      ┌───╫─────────┐
        ║          │   ║      ║   │      │   ║         │
        ║          │ b ║      ║ d │      │ f ║         │
        ║          │   ║      ║   │      │   ║         │
        ║          │   ║      ║   │      │   ║         │
        ╚══════════╪═══╝      ╚═══╪══════╪═══╝         │
                   │       c      │      │      g      │
                   │              │      │             │
                   │              │      │             │
                   └──────────────┘      └─────────────┘

Write a script to place the given unique numbers in the square box so that sum of numbers in each box is the same.

Example

Input: 1,2,3,4,5,6,7

Output:

    a = 6
    b = 4
    c = 1
    d = 5
    e = 2
    f = 3
    g = 7

    Box 1: a + b = 6 + 4 = 10
    Box 2: b + c + d = 4 + 1 + 5 = 10
    Box 3: d + e + f = 5 + 2 + 3 = 10
    Box 4: f + g = 3 + 7 = 10


Last date to submit the solution 23:59 (UK Time) Sunday 25th April 2021.


SO WHAT DO YOU THINK ?

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

Contact with me