The Weekly Challenge - 336

Monday, Aug 25, 2025| Tags: Perl, Raku

TABLE OF CONTENTS


  1. HEADLINES

  2. SPONSOR

  3. RECAP

  4. PERL REVIEW

  5. RAKU REVIEW

  6. CHART

  7. NEW MEMBERS

  8. GUESTS

  9. TASK #1: Equal Group

10. TASK #2: Final Score


HEADLINES


Welcome to the Week #336 of The Weekly Challenge.

Welcome back, Richard Park, and thanks for your contributions in APL.

Talking about guest contributors, below is the top five contributors:


1: Roger Bell_West (3268)

2: Abigail (1540)

3: Ulrich Rieke (1148)

4: Paulo Custodio (925)

5: Ali Moradi (873)


The gap between #1 and #2 is too large, and Abigail is no longer active these days. This will only widen the gap.

Paulo Custodio is on a short break, so there’s a good chance that Ali Moradi might soon take the #4 rank.

Looking at the regular contributors, we have different set of contributors as listed below:


1: Luca Ferrari (3350)

2: Jaldhar H. Vyas (3060)

3: Roger Bell_West (3060)

4: Laurent Rosenfeld (2906)

5: Arne Sommer (2308)


Here, except for Laurent Rosenfeld, everyone is active regularly, which makes this very interesting each week.

I also noticed the tie between #2 and #3. Overall, among the top 5 contributors, the gap between them is not very big either.


Happy Hacking!!


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

  Week      Perl       Raku       Blog   
   331       52       27       23   
   332       50       30       25   
   333       52       27       25   
   334       46       27       15   
   335       38       21       12   

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

  Week      Guests       Contributions       Languages   
   331       13       62       20   
   332       13       64       21   
   333       11       56       19   
   334       12       56       19   
   335       12       54       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     (3550)
 2. Rust       (978)
 3. Ruby       (817)
 4. Haskell    (803)
 5. Lua        (755)
 6. C++        (643)
 7. C          (596)
 8. JavaScript (580)
 9. Go         (529)
10. BQN        (460)

Blogs with Creative Title


1. Common Find by Arne Sommer.

2. Common Characters by Bob Lied.

3. Common Tics and Toes by Jorg Sommrey.

4. Uncommon Bags and Winning Lines by Matthias Muth.

5. Fanfare for the Common Character by Packy Anderson.

6. Common winner by Peter Campbell Smith.

7. The Commoners are Winning Characters by Roger Bell_West.

8. The Common Winner by Simon Green.


GitHub Repository Stats


1. Commits: 44,961 (+101)

2. Pull Requests: 12,527 (+38)

3. Contributors: 264 (+1)

4. Fork: 336 (+2)

5. Stars: 195



With start of Week #268, we have a new sponsor Lance Wicks until the end of year 2025. 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 - 335 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 #335.

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


Task 1: Equal Group

Submitted by: Mohammad Sajid Anwar

You are given an array of integers.

Write a script to return true if the given array can be divided into one or more groups: each group must be of the same size as the others, with at least two members, and with all members having the same value.


Example 1

Input: @ints = (1,1,2,2,2,2)
Output: true

Groups: (1,1), (2,2), (2,2)

Example 2

Input: @ints = (1,1,1,2,2,2,3,3)
Output: false

Groups: (1,1,1), (2,2,2), (3,3)

Example 3

Input: @ints = (5,5,5,5,5,5,7,7,7,7,7,7)
Output: true

Groups: (5,5,5,5,5,5), (7,7,7,7,7,7)

Example 4

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

Example 5

Input: @ints = (8,8,9,9,10,10,11,11)
Output: true

Groups: (8,8), (9,9), (10,10), (11,11)

Task 2: Final Score

Submitted by: Mohammad Sajid Anwar

You are given an array of scores by a team.

Write a script to find the total score of the given team. The score can be any integer, +, C or D. The + adds the sum of previous two scores. The score C invalidates the previous score. The score D will double the previous score.


Example 1

Input: @scores = ("5","2","C","D","+")
Output: 30

Round 1: 5
Round 2: 5 + 2
Round 3: 5 (invalidate the previous score 2)
Round 4: 5 + 10 (double the previous score 5)
Round 5: 5 + 10 + 15 (sum of previous two scores)

Total Scores: 30

Example 2

Input: @scores = ("5","-2","4","C","D","9","+","+")
Output: 27

Round 1: 5
Round 2: 5 + (-2)
Round 3: 5 + (-2) + 4
Round 4: 5 + (-2) (invalidate the previous score 4)
Round 5: 5 + (-2) + (-4) (double the previous score -2)
Round 6: 5 + (-2) + (-4) + 9
Round 7: 5 + (-2) + (-4) + 9 + 5 (sum of previous two scores)
Round 8: 5 + (-2) + (-4) + 9 + 5 + 14 (sum of previous two scores)

Total Scores: 27

Example 3

Input: @scores = ("7","D","D","C","+","3")
Output: 45

Round 1: 7
Round 2: 7 + 14 (double the previous score 7)
Round 3: 7 + 14 + 28 (double the previous score 14)
Round 4: 7 + 14 (invalidate the previous score 28)
Round 5: 7 + 14 + 21 (sum of previous two scores)
Round 6: 7 + 14 + 21 + 3

Total Scores: 45

Example 4

Input: @scores = ("-5","-10","+","D","C","+")
Output: -55

Round 1: (-5)
Round 2: (-5) + (-10)
Round 3: (-5) + (-10) + (-15) (sum of previous two scores)
Round 4: (-5) + (-10) + (-15) + (-30) (double the previous score -15)
Round 5: (-5) + (-10) + (-15) (invalidate the previous score -30)
Round 6: (-5) + (-10) + (-15) + (-25) (sum of previous two scores)

Total Scores: -55

Example 5

Input: @scores = ("3","6","+","D","C","8","+","D","-2","C","+")
Output: 128

Round  1: 3
Round  2: 3 + 6
Round  3: 3 + 6 + 9 (sum of previous two scores)
Round  4: 3 + 6 + 9 + 18 (double the previous score 9)
Round  5: 3 + 6 + 9 (invalidate the previous score 18)
Round  6: 3 + 6 + 9 + 8
Round  7: 3 + 6 + 9 + 8 + 17 (sum of previous two scores)
Round  8: 3 + 6 + 9 + 8 + 17 + 34 (double the previous score 17)
Round  9: 3 + 6 + 9 + 8 + 17 + 34 + (-2)
Round 10: 3 + 6 + 9 + 8 + 17 + 34 (invalidate the previous score -2)
Round 11: 3 + 6 + 9 + 8 + 17 + 34 + 51 (sum of previous two scores)

Total Scores: 128


Last date to submit the solution 23:59 (UK Time) Sunday 31st August 2025.


SO WHAT DO YOU THINK ?

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

Contact with me