The Weekly Challenge - 141

Monday, Nov 29, 2021| Tags: Perl, Raku










09. TASK #1: Number Divisors

10. TASK #2: Like Numbers


We are getting closer to the 1000 days of The Weekly Challenge. I would like to thank each and every sponsor of the FREE T-shirt campaign. Please do check out the blog post for up to date information about the campaign.

We have a new member in the Team PWC, David Santiago. He is a Raku fan.

Welcome back Mano Chandar after a long break. You last participated in the Week 73 as per our records.

Welcome back Alexander Pankoff. Last time you participated in the weekly challenge was in the Week 100.

The next few days would be devoted to the preparation of Advent Calendar of The Weekly Challenge. It would be our 3rd in a row. Thanks to all the contributors. If you want any of your blog post to be part of Advent Calendar then please do let me know.

Enjoy the cold weather but stay safe.

Blogs with Creative Title

1. Add the Table (or not) with Raku by Arne Sommer.

2. Table it? Yes or No?: The Weekly Challenge #140 by Dave Jacoby

3. Perl Weekly Challenge 140: Binary and Tabular by Roger Bell_West.

Let us share some interesting stats from the GitHub repository.

1. Commits: 21,683 (+223)

2. Pull Requests: 5,295 (+42)

3. Contributors: 183 (+2)

4. Fork: 233 (+3)

5. Stars: 113

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.


Quick recap of “The Weekly Challenge - 140” by Mohammad S Anwar.


Please check out Perl solutions review of the “The Weekly Challenge - 136” by Colin Crain.

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.


David Santiago, Raku enthusiasts joined the Team PWC.

I would like to learn and improve my Raku skills while still having fun.

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 checkout the guest contributions for the Week #140.

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

TASK #1 › Number Divisors

Submitted by: Mohammad S Anwar

Write a script to find lowest 10 positive integers having exactly 8 divisors.


24 is the first such number having exactly 8 divisors.
1, 2, 3, 4, 6, 8, 12 and 24.

TASK #2 › Like Numbers

Submitted by: Mohammad S Anwar

You are given positive integers, $m and $n.

Write a script to find total count of integers created using the digits of $m which is also divisible by $n.

Repeating of digits are not allowed. Order/Sequence of digits can’t be altered. You are only allowed to use (n-1) digits at the most. For example, 432 is not acceptable integer created using the digits of 1234. Also for 1234, you can only have integers having no more than three digits.

Example 1:

Input: $m = 1234, $n = 2
Output: 9

Possible integers created using the digits of 1234 are:
1, 2, 3, 4, 12, 13, 14, 23, 24, 34, 123, 124, 134 and 234.

There are 9 integers divisible by 2 such as:
2, 4, 12, 14, 24, 34, 124, 134 and 234.

Example 2:

Input: $m = 768, $n = 4
Output: 3

Possible integers created using the digits of 768 are:
7, 6, 8, 76, 78 and 68.

There are 3 integers divisible by 4 such as:
8, 76 and 68.

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


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

Contact with me