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: Count Even Digits Number
10. TASK #2: Sum of Values
HEADLINES
Welcome to the Week #258
of The Weekly Challenge
.
Let us all welcome Ruth Holloway
who joined the Team PWC
as a guest contributor to start with. She has contributed solutions in COBOL. It is always nice to see someone picked a language not many bothered to try. We should all take this opportunity to learn something new.
I’m “GeekRuthie,” aka Ruth Holloway, a 20-year veteran Perl coder and member of the Board of TPRF, and a member of the Dancer core team. I live in the southeastern US, and will be doing the challenges primarily in languages other than Perl or Raku, just for fun.
Last 5 weeks
mainstream contribution stats. Thank you Team PWC
for your support and encouragements.
Week |
Perl |
Raku |
Blog |
253 |
53 | 29 | 25 |
254 |
53 | 32 | 26 |
255 |
55 | 30 | 26 |
256 |
57 | 32 | 26 |
257 |
41 | 25 | 22 |
Last 5 weeks
guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
253 |
17 | 60 | 19 |
254 |
17 | 62 | 20 |
255 |
17 | 60 | 18 |
256 |
17 | 63 | 17 |
257 |
19 | 61 | 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 (2256)
2. Ruby (654)
3. Haskell (635)
4. Lua (580)
5. Rust (532)
6. C (483)
7. C++ (482)
8. JavaScript (337)
9. Go (329)
10. BQN (316)
Blogs with Creative Title
1. Currently Reduced by Arne Sommer.
2. Lesser, Inferior, Lower, Junior by Dave Jacoby.
3. Ranked Echelons by Jorg Sommrey.
4. Post-Valentine Challenge by Luca Ferrari.
5. Reduced is Smaller! by Packy Anderson.
6. Smaller and reduced by Peter Campbell Smith.
7. Smaller than Echelon by Roger Bell_West.
8. The current echelon by Simon Green.
GitHub Repository Stats
1. Commits: 36,780 (+127
)
2. Pull Requests: 9,634 (+44
)
3. Contributors: 243
4. Fork: 304
5. Stars: 168 (+1
)
SPONSOR
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 - 257 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
Ruth Holloway from USA
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 check out the guest contributions for the Week #257.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Count Even Digits Number
Submitted by: Mohammad Sajid Anwar
You are given a array of positive integers, @ints
.
Write a script to find out how many integers have even number of digits.
Example 1
Input: @ints = (10, 1, 111, 24, 1000)
Output: 3
There are 3 integers having even digits i.e. 10, 24 and 1000.
Example 2
Input: @ints = (111, 1, 11111)
Output: 0
Example 3
Input: @ints = (2, 8, 1024, 256)
Output: 1
Task 2: Sum of Values
Submitted by: Mohammad Sajid Anwar
You are given an array of integers, @int
and an integer $k
.
Write a script to find the sum of values whose index binary representation has exactly $k
number of 1-bit
set.
Example 1
Input: @ints = (2, 5, 9, 11, 3), $k = 1
Output: 17
Binary representation of index 0 = 0
Binary representation of index 1 = 1
Binary representation of index 2 = 10
Binary representation of index 3 = 11
Binary representation of index 4 = 100
So the indices 1, 2 and 4 have total one 1-bit sets.
Therefore the sum, $ints[1] + $ints[2] + $ints[4] = 17
Example 2
Input: @ints = (2, 5, 9, 11, 3), $k = 2
Output: 11
Example 3
Input: @ints = (2, 5, 9, 11, 3), $k = 0
Output: 2
Last date to submit the solution 23:59 (UK Time) Sunday 3rd March 2024.