The Weekly Challenge - 224

Monday, Jul 3, 2023| Tags: Perl, Raku










09. TASK #1: Special Notes

10. TASK #2: Additive Number


Welcome to the Week #224 of The Weekly Challenge.

I am missing one of the most regular member, Duncan C. White. I hope he is fine and would come back to the weekly fun soon.

As you all know, The Perl and Raku Conference 2023, is happening in Toronto next week between 11-13 July 2023. I am all geared up to attend the conference and even prepared to give talk on The Weekly Challenge.

How many of you are going to be there? I would love to meet as many as I can.

Time to declare next champion and he is Matthias Muth from Germany. As of today, he has contributed 38 Perl solutions and shared 16 blog posts.

Today, we are giving away Coupon #47 to Bruce Gray for the book, Learning Perl Exercises by brian d foy. I will share the details with you in a separate email.

I just noticed Peter Meszaros is declared twice, #37 and #44. It would mean, we need new member to get this sorted. Apology for the mess.

I am still waiting for BarrOff to share email address with us, so that ebook can be shared with him.


  S. No.    Name S. No.  Name
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  
11.  Duncan C. White 12.  Ali Moradi
13.  Jorg Sommrey 14.  James Smith
15.  Alexander Pankoff 16.  Simon Green
17.  Robbie Hatley 18.  Bob Lied
19.  Athanasius 20.  David Ferrone
21.  Thomas Kohler 22.  Adam Russell
23.  E. Choroba 24.  Pip Stuart
25.  Roger Bell_West 26.  Flavio Poletti
27.  Dave Jacoby 28.  Mariano Spadaccini
29.  Lubos Kolouch 30.  Matthew Neleigh
31.  Paulo Custodio 32.  Tyler Bird
33.  Carlos Oliveira 34.  Avery Adams
35.  Matthias Muth 36.  Leo Manfredi
37.  Peter Meszaros 38.  Arne Sommer
39.  Jaldhar H. Vyas 40.  Mark Anderson
41.  Rob Turner 42.  BarrOff
43.  Robert Ransbottom 44.  Peter Meszaros
45.  Jan Krnavek 46.  Steven Wilson
47. 48.
49. 50.

Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.

  Week      Perl       Raku       Blog   
   219       35       22       22   
   220       49       29       18   
   221       39       27       16   
   222       56       30       19   
   223       44       25       16   

Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.

  Week      Guests       Contributions       Languages   
   219       12       37       15   
   220       06       32       10   
   221       07       23       09   
   222       10       41       14   
   223       09       37       13   

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.

Rust jumped one position up and reached the rank #6 last week. Congratulations to all Rust contributors.

 1. Python  (1624)
 2. Haskell (561)
 3. Ruby    (535)
 4. Lua     (481)
 5. C       (429)
 6. Rust    (387)
 7. C++     (384)
 8. BQN     (299)
 9. Go      (258)
10. Java    (237)

Blogs with Creative Title

1. Boxed Primes by Arne Sommer.

2. Count Primes? I’ve Never Met the Man by Avery Adams.

3. Sieves and Coins by Matthias Muth.

4. Counting primes and maximising cash by Peter Campbell Smith.

5. Counting Boxes by Roger Bell_West.

6. Counting the coins by Simon Green.

GitHub Repository Stats

1. Commits: 33,083 (+75)

2. Pull Requests: 8,305 (+31)

3. Contributors: 226 (+1)

4. Fork: 285

5. Stars: 159

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 2023. 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 2023. 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.


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


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


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


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.


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.


Please check out the guest contributions for the Week #223.

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

Task 1: Special Notes

Submitted by: Mohammad S Anwar

You are given two strings, $source and $target.

Write a script to find out if using the characters (only once) from source, a target string can be created.

Example 1

Input: $source = "abc"
       $target = "xyz"
Output: false

Example 2

Input: $source = "scriptinglanguage"
       $target = "perl"
Output: true

Example 3

Input: $source = "aabbcc"
       $target = "abc"
Output: true

Task 2: Additive Number

Submitted by: Mohammad S Anwar

You are given a string containing digits 0-9 only.

Write a script to find out if the given string is additive number. An additive number is a string whose digits can form an additive sequence.

A valid additive sequence should contain at least 3 numbers. Except the first 2 numbers, each subsequent number in the sequence must be the sum of the preceding two.

Example 1:

Input: $string = "112358"
Output: true

The additive sequence can be created using the given string digits: 1,1,2,3,5,8
1 + 1 => 2
1 + 2 => 3
2 + 3 => 5
3 + 5 => 8

Example 2:

Input: $string = "12345"
Output: false

No additive sequence can be created using the given string digits.

Example 3:

Input: $string = "199100199"
Output: true

The additive sequence can be created using the given string digits: 1,99,100,199
 1 +  99 => 100
99 + 100 => 199

Last date to submit the solution 23:59 (UK Time) Sunday 9th July 2023.


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

Contact with me