The Weekly Challenge - 143

Monday, Dec 13, 2021| 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: Calculator

10. TASK #2: Stealthy Number


HEADLINES



First thing first, let us Meet The Champion - W. Luis Mochan.

I am sure, you all wanted to know about the 1000 days T-shirt campaign. I have had few more responses from the champions. There are still quite a lot members who have not replied to my email. I am waiting for the response before I move to next stage. I would recommend to check out the blog post for more update. Thanks to all the sponsors.


Advent Calendar 2021


I have slightly changed the look and feel of the Advent Calendar. I hope you like it.


Day 7: Self-descriptive Numbers by James Smith.

Day 8: Canonical Path by Colin Crain.

Day 9: Next Palindrome Number by Laurent Rosenfeld.

Day 10: Clock Angle by Roger Bell_West.

Day 11: Average of Stream by Adam Russell.

Day 12: Square Points by Cheok-Yin Fung.


Blogs with Creative Title


1. Sleeping Divisors by Adam Russell.

2. At Sleep at Last with Raku by Arne Sommer.

3. Sleep On It: The Weekly Challenge #142 by Dave Jacoby

4. Clarity versus brevity by Peter Campbell Smith.

5. The Weekly Challenge 142: The Last Digit of Sleep by Roger Bell_West.


Let us share some interesting stats from the GitHub repository.

1. Commits: 21,957 (+143)

2. Pull Requests: 5,360 (+33)

3. Contributors: 183

4. Fork: 234 (+1)

5. Stars: 116 (+2)


Last but not least, I would like to thank each and every member for their support and encouragement.



Our solo sponsor Pete Sergeant has been a great support to keep us motivated. We are lucky that he agreed to continue the journey with us in the year 2021. I would like to personally thank Pete and his entire team for their generosity. It would be great if we could add few more to sponsor the prize money so that we could go back and declare weekly champions as we have done in the past. I hope and wish this will become possible in 2021. The amount doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If an organisation comes forward and supports us then that would be the ultimate achievement.


RECAP


Quick recap of “The Weekly Challenge - 142” by Mohammad S 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 checkout the guest contributions for the Week #142.

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


TASK #1 › Calculator

Submitted by: Mohammad S Anwar

You are given a string, $s, containing mathematical expression.

Write a script to print the result of the mathematical expression. To keep it simple, please only accept + - * ().

Example 1:

    Input: $s = "10 + 20 - 5"
    Output: 25

Example 2:

    Input: $s = "(10 + 20 - 5) * 2"
    Output: 50

TASK #2 › Stealthy Number

Submitted by: Mohammad S Anwar

You are given a positive number, $n.

Write a script to find out if the given number is Stealthy Number.

A positive integer N is stealthy, if there exist positive integers a, b, c, d such that a * b = c * d = N and a + b = c + d + 1.

Example 1

Input: $n = 36
Output: 1

Since 36 = 4 (a) * 9 (b) = 6 (c) * 6 (d) and 4 (a) + 9 (b) = 6 (c) + 6 (d) + 1.

Example 2

Input: $n = 12
Output: 1

Since 2 * 6 = 3 * 4 and 2 + 6 = 3 + 4 + 1

Example 3

Input: $n = 6
Output: 0

Since 2 * 3 = 1 * 6 but 2 + 3 != 1 + 6 + 1


Last date to submit the solution 23:59 (UK Time) Sunday 19th December 2021.


SO WHAT DO YOU THINK ?

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

Contact with me