The Weekly Challenge - 156

Monday, Mar 14, 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: Pernicious Numbers

10. TASK #2: Weird Number


HEADLINES


Welcome Daniel Pfeiffer to the Team PWC. We are now strong team of 252 members.

The interview with our latest champion, Robert DiCicco, is live now. It was great knowing him. Robert is so lucky to be able to spend time coding even after retirement. Ideally I would also want to spend my time with Perl post retirement. Given a choice, I would retire today and spend every minute doing Perl. Having said, I know I have responsibilities and I have to fulfill it with utmost sincerity.

In my experience, when I enjoy what I do then life is super fun. I also know, not every day can be the same. In the current time, it is very important to keep the negative thoughts away. Running the weekly challenge contest helps me a lot. All credit goes to every members of Team PWC. Unfortunately another week gone and no time to contribute to the weekly challenge. Luckily there was plenty of contributions by the team members. Above all, the Perl Review by Colin Crain kept me engaged. When I see my name mentioned in the review then it is always a pride moment for me.

Last 3 weeks contributions by Team PWC are 95, 104 and 97. The numbers are very encouraging. Even guest contributions of last 3 weeks are 116, 73 and 87. Overall contributions in the last 3 years (nearly) is 14,310.

Last but not least, I am little busy these days and hence the delay in the design/order of T-shirt for the big event. Please bear with me.

Have fun with the weekly challenge. Please do share your ideas to make it fun for everyone.


Blogs with Creative Title


1. Fortunate Pisano by Adam Russell.

2. Pisano the Fortunate by Arne Sommer.

3. I say Potato, you say Pisano by Bruce Gray.

4. The Fortunate Son by Colin Crain.

5. Pisa Party by Colin Crain.

6. I Ain’t No Fortunate One by Dave Jacoby.

7. Fortunate and Pisano in Primes by Luca Ferrari.

8. Bigint week by Peter Campbell Smith.

9. Pisano’s Fortune by Roger Bell_West.


GitHub Repository Stats


1. Commits: 23,827 (+130)

2. Pull Requests: 5,769 (+29)

3. Contributors: 188

4. Fork: 244

5. Stars: 123



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


PERL REVIEW


Please check out Perl solutions review of the The Weekly Challenge - 151 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


[Daniel Pfeiffer], an expert in Perl, from Germany joined the Team PWC.

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

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


TASK #1 › Pernicious Numbers

Submitted by: Mohammad S Anwar

Write a script to permute first 10 Pernicious Numbers.

A pernicious number is a positive integer which has prime number of ones in its binary representation.

The first pernicious number is 3 since binary representation of 3 = (11) and 1 + 1 = 2, which is a prime.

Expected Output

3, 5, 6, 7, 9, 10, 11, 12, 13, 14

TASK #2 › Weird Number

Submitted by: Mohammad S Anwar

You are given number, $n > 0.

Write a script to find out if the given number is a Weird Number.

According to Wikipedia, it is defined as:

The sum of the proper divisors (divisors including 1 but not itself) of the number is greater than the number, but no subset of those divisors sums to the number itself.

Example 1:

Input: $n = 12
Output: 0

Since the proper divisors of 12 are 1, 2, 3, 4, and 6, which sum to 16; but 2 + 4 + 6 = 12.

Example 2:

Input: $n = 70
Output: 1

As the proper divisors of 70 are 1, 2, 5, 7, 10, 14, and 35; these sum to 74, but no subset of these sums to 70.


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


SO WHAT DO YOU THINK ?

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

Contact with me