The Weekly Challenge - 262

Monday, Mar 25, 2024| 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: Max Positive Negative

10. TASK #2: Count Equal Divisible


HEADLINES


Welcome to the Week #262 of The Weekly Challenge.

As we all know, we regularly receive solutions in guest languages. Python is the leading language in the list. Last week, two more languages added to the list, thanks to Ali Moradi and Lance Wicks.

Lance Wicks, one of the strong supporter of The Weekly Challenge, surprised us with his contributions in Perl and Roc.

Ali Moradi, is also a big contributor in guest languages. He shared solutions in Standard ML and Scheme.

Thank you Team PWC for your support and encouragements.



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

  Week      Perl       Raku       Blog   
   257       41       25       22   
   258       56       38       30   
   259       41       19       22   
   260       50       28       27   
   261       55       32       25   

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

  Week      Guests       Contributions       Languages   
   257       19       61       20   
   258       17       67       19   
   259       13       44       17   
   260       14       56       17   
   261       18       79       24   

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     (2359)
 2. Ruby       (664)
 3. Haskell    (642)
 4. Lua        (586)
 5. Rust       (585)
 6. C          (519)
 7. C++        (489)
 8. JavaScript (380)
 9. Go         (342)
10. BQN        (323)

Blogs with Creative Title


1. These Elements, They’re Multiplying! by Adam Russell.

2. Two Elements by Arne Sommer.

3. Can You Digit It? by Dave Jacoby.

4. Bits, Digits and Numbers by Jorg Sommrey.

5. a short one! by Luca Ferrari.

6. Summing Up Two Short Challenge Elements by Matthias Muth.

7. Two Elements, Multiplied by Digit Sum by Packy Anderson.

8. Digits and doubling by Peter Campbell Smith.

9. Two Elements Who Adore You by Roger Bell_West.


GitHub Repository Stats


1. Commits: 37,280 (+118)

2. Pull Requests: 9,793 (+44)

3. Contributors: 243

4. Fork: 306

5. Stars: 170



In the year 2024, we are looking for new sponsor for monthly 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 - 261 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 #261.

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


Task 1: Max Positive Negative

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints.

Write a script to return the maximum number of either positive or negative integers in the given array.

Example 1

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

Count of positive integers: 4
Count of negative integers: 3
Maximum of count of positive and negative integers: 4

Example 2

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

Count of positive integers: 1
Count of negative integers: 3
Maximum of count of positive and negative integers: 3

Example 3

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

Count of positive integers: 2
Count of negative integers: 0
Maximum of count of positive and negative integers: 2

Task 2: Count Equal Divisible

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints and an integer $k.

Write a script to return the number of pairs (i, j) where

a) 0 <= i < j < size of @ints
b) ints[i] == ints[j]
c) i x j is divisible by k

Example 1

Input: @ints = (3,1,2,2,2,1,3) and $k = 2
Output: 4

(0, 6) => ints[0] == ints[6] and 0 x 6 is divisible by 2
(2, 3) => ints[2] == ints[3] and 2 x 3 is divisible by 2
(2, 4) => ints[2] == ints[4] and 2 x 4 is divisible by 2
(3, 4) => ints[3] == ints[4] and 3 x 4 is divisible by 2

Example 2

Input: @ints = (1,2,3) and $k = 1
Output: 0


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


SO WHAT DO YOU THINK ?

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

Contact with me