The Weekly Challenge - 303

Monday, Jan 6, 2025| 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: 3-digits Even

10. TASK #2: Delete and Earn


HEADLINES


Welcome to the Week #303 of The Weekly Challenge.

Today is the first Monday of the month and year 2025, so it is time to declare the last champion of the year 2024. With great pride, I announce, Arne Sommer as the Champion of the Month for the second time. He has been one of the most consistent contributors for a very long time. I don’t remember if he has ever missed a week. He primarily shared solutions in Raku but in the past he has also contributed in Perl. For me, the best contribution is his creative blog post every week. Plenty of discussion with link to the official documentation. Anyone can easily understand the underlying function. Thank you, Arne Sommer, for your support and contribution.

In couple of months i.e. March 2025, we would complete the 6th year of weekly challenge. It has been a long journey. Without the support and encouragement, I wouldn’t have made it so far. Having said, I do feel little tired now. Could it be, age is catching up? I still have plenty of support to carry on for few more years. I will never let it die, no matter what.

Keep sharing knowledge and fresh ideas in the new year.



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

  Week      Perl       Raku       Blog   
   298       35       18       21   
   299       37       13       10   
   300       41       19       16   
   301       45       18       13   
   302       37       20       16   

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

  Week      Guests       Contributions       Languages   
   298       9       45       19   
   299       10       45       19   
   300       10       42       16   
   301       9       39       15   
   302       12       48       19   

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     (3135)
 2. Rust       (824)
 3. Ruby       (759)
 4. Haskell    (735)
 5. Lua        (676)
 6. C          (590)
 7. C++        (577)
 8. JavaScript (522)
 9. Go         (446)
10. BQN        (404)

Blogs with Creative Title


1. Zero Step by Arne Sommer.

2. 3^4 * 5*2 by Dave Jacoby.

3. Optimal Steps by Jorg Sommrey.

4. All about ones by Peter Campbell Smith.

5. Step By Step One Becomes Zero by Roger Bell_West.

6. Step zero, step one by Simon Green.


GitHub Repository Stats


1. Commits: 41,826 (+90)

2. Pull Requests: 11,390 (+33)

3. Contributors: 256

4. Fork: 323

5. Stars: 181 (+1)



With start of Week #268, we have a new sponsor Lance Wicks for the entire year 2024. Having said we are looking for more sponsors so that we can go back to weekly winner. If anyone interested please get in touch with us at perlweeklychallenge@yahoo.com. Thanks for your support in advance.


RECAP


Quick recap of The Weekly Challenge - 302 by Mohammad Sajid 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 #302.

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


Task 1: 3-digits Even

Submitted by: Mohammad Sajid Anwar

You are given a list (3 or more) of positive integers, @ints.

Write a script to return all even 3-digits integers that can be formed using the integers in the given list.

Example 1

Input: @ints = (2, 1, 3, 0)
Output: (102, 120, 130, 132, 210, 230, 302, 310, 312, 320)

Example 2

Input: @ints = (2, 2, 8, 8, 2)
Output: (222, 228, 282, 288, 822, 828, 882)

Task 2: Delete and Earn

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints.

Write a script to return the maximum number of points you can earn by applying the following operation some number of times.

Pick any ints[i] and delete it to earn ints[i] points.
Afterwards, you must delete every element equal to ints[i] - 1
and every element equal to ints[i] + 1.

Example 1

Input: @ints = (3, 4, 2)
Output: 6

Delete 4 to earn 4 points, consequently, 3 is also deleted.
Finally delete 2 to earn 2 points.

Example 2

Input: @ints = (2, 2, 3, 3, 3, 4)
Output: 9

Delete a 3 to earn 3 points. All 2's and 4's are also deleted too.
Delete a 3 again to earn 3 points.
Delete a 3 once more to earn 3 points.


Last date to submit the solution 23:59 (UK Time) Sunday 12th January 2025.


SO WHAT DO YOU THINK ?

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

Contact with me