The Weekly Challenge - 188

Monday, Oct 24, 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: Divisible Pairs

10. TASK #2: Total Zero


HEADLINES


Welcome to the Week #188 of The Weekly Challenge.

We are into the fourth week of Hacktoberfest 2022. At last, we made it, little late though to get the 100+ mark this time too.


Week: #1  #2  #3  #4
--------------------
Perl: 57  61  58  51
Raku: 31  35  33  34
Blog: 17  19  20  20

Last week, we had 36 regular contributors and 13 guest contributors. Thank you everyone for the support and encouragement.

Today, we are giving away Token #11 to Duncan C. White for the book, Learning Perl Exercises by brian d foy. I will share the details with you in a separate email.


Past Winners

 1) Cheok-Yin Fung
 2) W. Luis Mochan
 3) Robert DiCicco
 4) Kueppo Wesley
 5) Solathian
 6) Dario Mazzeo
 7) Peter Campbell Smith
 8) Kjetil Skotheim
 9) Neils van Dijke
10) Laurent Rosenfeld

Last week, I managed to contribute a bit more than usual as listed below:


Task #1: Days Together     [Perl] [Raku] [Python] [Java]

Permuted Multiples


Task #2: Magical Triplets     [Perl] [Raku] [Python]

Reversible Numbers


TOP 10 Guest Languages


Do you see your favourite language in the Top 10? If not then why not contribute regularly and make it to the top.

 1. Python  (1145)
 2. Haskell (502)
 3. Ruby    (406)
 4. Lua     (391)
 5. C       (276)
 6. C++     (274)
 7. BQN     (261)
 8. Rust    (242)
 9. Go      (226)
10. Node.js (194)

Blogs with Creative Title


1. Days Together Are Magical by Adam Russell.

2. Magical Together by Arne Sommer.

3. overlapping days and numbers by Luca Ferrari.

4. Foo meets Bar and the wizardly trio by Peter Campbell Smith.

5. Magical Days Together by Roger Bell_West.

6. Magical Days Together with Triplets by Simon Green.


GitHub Repository Stats


1. Commits: 28,585 (+125)

2. Pull Requests: 6,945 (+33)

3. Contributors: 208

4. Fork: 265

5. Stars: 144



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 - 187 by Mohammad S Anwar.


PERL REVIEW


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 check out the guest contributions for the Week #187.

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


Task 1: Divisible Pairs

Submitted by: Mohammad S Anwar

You are given list of integers @list of size $n and divisor $k.

Write a script to find out count of pairs in the given list that satisfies the following rules.

The pair (i, j) is eligible if and only if
a) 0 <= i < j < len(list)
b) list[i] + list[j] is divisible by k

Example 1

Input: @list = (4, 5, 1, 6), $k = 2
Output: 2

Example 2

Input: @list = (1, 2, 3, 4), $k = 2
Output: 2

Example 3

Input: @list = (1, 3, 4, 5), $k = 3
Output: 2

Example 4

Input: @list = (5, 1, 2, 3), $k = 4
Output: 2

Example 5

Input: @list = (7, 2, 4, 5), $k = 4
Output: 1

Task 2: Total Zero

Submitted by: Mohammad S Anwar

You are given two positive integers $x and $y.

Write a script to find out the number of operations needed to make both ZERO. Each operation is made up either of the followings:

$x = $x - $y if $x >= $y

or

$y = $y - $x if $y >= $x (using the original value of $x)

Example 1

Input: $x = 5, $y = 4
Output: 5

Example 2

Input: $x = 4, $y = 6
Output: 3

Example 3

Input: $x = 2, $y = 5
Output: 4

Example 4

Input: $x = 3, $y = 1
Output: 3

Example 5

Input: $x = 7, $y = 4
Output: 5


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


SO WHAT DO YOU THINK ?

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

Contact with me