The Weekly Challenge - 126

Monday, Aug 16, 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: Count Numbers

10. TASK #2: Minesweeper Game


HEADLINES


Welcome to yet another edition of the weekly challenge.

I noticed the Week #125 was not so happening as compare to other weeks.

Could holiday season be the reason? Possibly.

I know some of the Team PWC members are enjoying the holiday break. Having said that they are not skipping the weekly contributions.

It makes me feel guilty as I haven’t contributed in the last 2 weeks. I am too busy in my day job work. I will try to find some time this week.

I am not sure if you have noticed something about the blog contributions by Team PWC?

More and more members come up with catchy blog title now a days. Earlier it was just one or two.

Some of my favourites from last week contributions are as follows:

1. Pythagorean Tree with Raku by Arne Sommer.

2. Triple Tree Rings by Colin Crain.

3. Pythagorean Diameter by Roger Bell_West.


Let us share some interesting stats from the GitHub repository.

1. Commits: 19,233 (+137)

2. Pull Requests: 4,713 (+32)

3. Contributors: 173

4. Fork: 219

5. Stars: 98


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 - 125” by Mohammad S Anwar.


PERL REVIEW


Please check out Perl solutions review of the “The Weekly Challenge - 123” by Colin Crain.

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

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


TASK #1 › Count Numbers

Submitted by: Mohammad S Anwar

You are given a positive integer $N.

Write a script to print count of numbers from 1 to $N that don’t contain digit 1.

Example

Input: $N = 15
Output: 8

    There are 8 numbers between 1 and 15 that don't contain digit 1.
    2, 3, 4, 5, 6, 7, 8, 9.

Input: $N = 25
Output: 13

    There are 13 numbers between 1 and 25 that don't contain digit 1.
    2, 3, 4, 5, 6, 7, 8, 9, 20, 22, 23, 24, 25.

TASK #2 › Minesweeper Game

Submitted by: Cheok-Yin Fung

You are given a rectangle with points marked with either x or *. Please consider the x as a land mine.

Write a script to print a rectangle with numbers and x as in the Minesweeper game.

A number in a square of the minesweeper game indicates the number of mines within the neighbouring squares (usually 8), also implies that there are no bombs on that square.

Example

Input:
    x * * * x * x x x x
    * * * * * * * * * x
    * * * * x * x * x *
    * * * x x * * * * *
    x * * * x * * * * x

Output:
    x 1 0 1 x 2 x x x x
    1 1 0 2 2 4 3 5 5 x
    0 0 1 3 x 3 x 2 x 2
    1 1 1 x x 4 1 2 2 2
    x 1 1 3 x 2 0 0 1 x


Last date to submit the solution 23:59 (UK Time) Sunday 22nd August 2021.


SO WHAT DO YOU THINK ?

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

Contact with me