The Weekly Challenge - 324

Monday, Jun 2, 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: 2D Array

10. TASK #2: Total XOR


HEADLINES


Welcome to the Week #324 of The Weekly Challenge.

Today is the first Monday of the month and time to declare the next Champion of the Month. With great pleasure, I announce, Andrew Shitov, as the next champion. He was last declared champion in October, 2020.

As of today, he has contributed 5 Perl, 95 Raku and 35 Blogs. He is currently ranked #39 in the Guest Leaders and contributed in Bash, C, C#, C++, D, Dart, Fortran, Go, HTML, Java, JavaScript, Julia, Kotlin, Lisp, Lua, PHP, Pascal, Python, Ruby, Rust, Scala, Typescript and XSLT.

I noticed the Week #321 is getting closer to the magic number with some late contributions. Thanks to each and every member of Team PWC.

Happy Hacking!!


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

  Week      Perl       Raku       Blog   
   319       38       20       16   
   320       46       26       18   
   321       46       26       27   
   322       44       24       25   
   323       42       22       24   

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

  Week      Guests       Contributions       Languages   
   319       14       58       22   
   320       14       62       23   
   321       13       61       23   
   322       13       56       19   
   323       11       58       20   

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     (3402)
 2. Rust       (914)
 3. Ruby       (801)
 4. Haskell    (779)
 5. Lua        (726)
 6. C++        (619)
 7. C          (590)
 8. JavaScript (564)
 9. Go         (490)
10. BQN        (440)

Blogs with Creative Title


1. Increment Tax by Arne Sommer.

2. Orders Matter and Order Matters by Dave Jacoby.

3. Tax Steps by Jorg Sommrey.

4. increment and decrement by Luca Ferrari.

5. Decrement Your Tax Amount by Matthias Muth.

6. Should five percent appear too small… by Packy Anderson.

7. Up, down, and pay your tax by Peter Campbell Smith.

8. Incremental Tax by Roger Bell_West.

9. Counting the tax by Simon Green.


GitHub Repository Stats


1. Commits: 43,735 (+82)

2. Pull Requests: 12,096 (+32)

3. Contributors: 260

4. Fork: 327

5. Stars: 191



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

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


Task 1: 2D Array

Submitted by: Mohammad Sajid Anwar

You are given an array of integers and two integers $r amd $c.

Write a script to create two dimension array having $r rows and $c columns using the given array.


Example 1

Input: @ints = (1, 2, 3, 4), $r = 2, $c = 2
Output: ([1, 2], [3, 4])

Example 2

Input: @ints = (1, 2, 3), $r = 1, $c = 3
Output: ([1, 2, 3])

Example 3

Input: @ints = (1, 2, 3, 4), $r = 4, $c = 1
Output: ([1], [2], [3], [4])

Task 2: Total XOR

Submitted by: Mohammad Sajid Anwar

You are given an array of integers.

Write a script to return the sum of total XOR for every subset of given array.


Example 1

Input: @ints = (1, 3)
Output: 6

Subset [1],    total XOR = 1
Subset [3],    total XOR = 3
Subset [1, 3], total XOR => 1 XOR 3 => 2

Sum of total XOR => 1 + 3 + 2 => 6

Example 2

Input: @ints = (5, 1, 6)
Output: 28

Subset [5],       total XOR = 5
Subset [1],       total XOR = 1
Subset [6],       total XOR = 6
Subset [5, 1],    total XOR => 5 XOR 1 => 4
Subset [5, 6],    total XOR => 5 XOR 6 => 3
Subset [1, 6],    total XOR => 1 XOR 6 => 7
Subset [5, 1, 6], total XOR => 5 XOR 1 XOR 6 => 2

Sum of total XOR => 5 + 1 + 6 + 4 + 3 + 7 + 2 => 28

Example 3

Input: @ints = (3, 4, 5, 6, 7, 8)
Output: 480


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


SO WHAT DO YOU THINK ?

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

Contact with me