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: Zeckendorf Representation
10. TASK #2: Find Celebrity
HEADLINES
Welcome to the Week #361 of The Weekly Challenge.
Team PWC members, David Ferrone and Paulo Custodio have been working overtime to bring the C language back into the race. Their efforts have paid off: C has moved up one rank to #6. Now we have tough fight among Ruby, Haskell and Lua as well. They are all very close to each other. Similarly C and C++ remain neck-and-neck.
In recent weeks, I’ve noticed that guest contributons have increased and sometimes very close to regular contributions.
The target for guest contributions is set to 50 and 100 for regular contributions. In the first six weeks of 2026 so far, guest contributors reached their target five times, whereas regular contributors did so only once. These statistics are very fascinating and tells us a lot.
Bottom line: there is plenty to learn from each contribution every week. I wish I had time to go through all of them, but I am relieved that they are preserved in the repository forever, so anyone can come back to them later. The repository is becoming a knowledge bank, FREE for all. We have top-notch contributions preserved for the next generation. I’m sure that as people explore these gems, they will greatly appreciate the creators.
This week, with no school (closed for a week), I have a little extra time in the morning to stay in bed. Also Ramadan is starting midweek too and that will definitely change the routine a bit.
Enjoy the fun challenges.
Below is my contributions to the Task #1 of Week #360.
Perl: source code
sub justify_text {
my ($str, $width) = @_;
my $pad = $width - length $str;
return "*" x int($pad / 2) . $str . "*" x ($pad - int($pad / 2));
}
Raku: source code
sub justify-text(Str $str, Int $width) {
my $pad = $width - $str.chars;
return "*" x ($pad div 2) ~ $str ~ "*" x ($pad - ($pad div 2));
}
Python: source code
def justify_text(s: str, width: int) -> str:
pad = width - len(s)
left = pad // 2
right = pad - left
return "*" * left + s + "*" * right
Thank you Team PWC, once again.
Happy Hacking!!
Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.
Week |
Perl |
Raku |
Blog |
356 |
44 | 18 | 13 |
357 |
50 | 23 | 25 |
358 |
53 | 23 | 27 |
359 |
52 | 20 | 21 |
360 |
53 | 19 | 16 |
Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
356 |
14 | 41 | 11 |
357 |
18 | 73 | 19 |
358 |
18 | 71 | 20 |
359 |
18 | 68 | 23 |
360 |
16 | 73 | 22 |
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 (4136)
2. Rust (1103)
3. Ruby (869)
4. Haskell (865)
5. Lua (843)
6. C (694)
7. C++ (692)
8. Go (640)
9. JavaScript (621)
10. BQN (505)
Blogs with Creative Title
1. Full Circle by Arne Sommer.
2. Pertaining to a subtlety of sorting by Bob Lied.
3. This is exactly the sort of justification that I was looking for by Marc Perry.
4. Justifying TIMTOWTDI by Matthias Muth.
5. Word Crimes are Justified by Packy Anderson.
6. Padding and sorting by Peter Campbell Smith.
7. Justify the Words by Roger Bell_West.
8. Padding and sorting by Simon Green.
9. Perl Power: Two Tiny Scripts, Big Learning! by Vinod Kumar K.
GitHub Repository Stats
1. Commits: 47,862 (+114)
2. Pull Requests: 13,556 (+43)
3. Contributors: 273
4. Fork: 348
5. Stars: 209
SPONSOR
We are looking for sponsor for monthly prize pot of US $50. 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 - 360 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 #360.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Zeckendorf Representation
Submitted by: Mohammad Sajid Anwar
You are given a positive integer (<= 100).
Write a script to return Zeckendorf Representation of the given integer.
Every positive integer can be uniquely represented as sum of non-consecutive Fibonacci numbers.
Example 1
Input: $int = 4
Output: 3,1
4 => 3 + 1 (non-consecutive fibonacci numbers)
Example 2
Input: $int = 12
Output: 8,3,1
12 => 8 + 3 + 1
Example 3
Input: $int = 20
Output: 13,5,2
20 => 13 + 5 + 2
Example 4
Input: $int = 96
Output: 89,5,2
96 => 89 + 5 + 2
Example 5
Input: $int = 100
Output: 89,8,3
100 => 89 + 8 + 3
Task 2: Find Celebrity
Submitted by: Mohammad Sajid Anwar
You are given a binary matrix (m x n).
Write a script to find the celebrity, return -1 when none found.
A celebrity is someone, everyone knows and knows nobody.
Example 1
Input: @party = (
[0, 0, 0, 0, 1, 0], # 0 knows 4
[0, 0, 0, 0, 1, 0], # 1 knows 4
[0, 0, 0, 0, 1, 0], # 2 knows 4
[0, 0, 0, 0, 1, 0], # 3 knows 4
[0, 0, 0, 0, 0, 0], # 4 knows NOBODY
[0, 0, 0, 0, 1, 0], # 5 knows 4
);
Output: 4
Example 2
Input: @party = (
[0, 1, 0, 0], # 0 knows 1
[0, 0, 1, 0], # 1 knows 2
[0, 0, 0, 1], # 2 knows 3
[1, 0, 0, 0] # 3 knows 0
);
Output: -1
Example 3
Input: @party = (
[0, 0, 0, 0, 0], # 0 knows NOBODY
[1, 0, 0, 0, 0], # 1 knows 0
[1, 0, 0, 0, 0], # 2 knows 0
[1, 0, 0, 0, 0], # 3 knows 0
[1, 0, 0, 0, 0] # 4 knows 0
);
Output: 0
Example 4
Input: @party = (
[0, 1, 0, 1, 0, 1], # 0 knows 1, 3, 5
[1, 0, 1, 1, 0, 0], # 1 knows 0, 2, 3
[0, 0, 0, 1, 1, 0], # 2 knows 3, 4
[0, 0, 0, 0, 0, 0], # 3 knows NOBODY
[0, 1, 0, 1, 0, 0], # 4 knows 1, 3
[1, 0, 1, 1, 0, 0] # 5 knows 0, 2, 3
);
Output: 3
Example 5
Input: @party = (
[0, 1, 1, 0], # 0 knows 1 and 2
[1, 0, 1, 0], # 1 knows 0 and 2
[0, 0, 0, 0], # 2 knows NOBODY
[0, 0, 0, 0] # 3 knows NOBODY
);
Output: -1
Example 6
Input: @party = (
[0, 0, 1, 1], # 0 knows 2 and 3
[1, 0, 0, 0], # 1 knows 0
[1, 1, 0, 1], # 2 knows 0, 1 and 3
[1, 1, 0, 0] # 3 knows 0 and 1
);
Output: -1
Last date to submit the solution 23:59 (UK Time) Sunday 22nd February 2026.