The Weekly Challenge - 082

Monday, Oct 12, 2020| Tags: Perl, Raku

7. GUESTS

Congratulations Team PWC for crossing the magic number 4th times in a row.

Welcome Jose Luis and Frank Oosterhuis to the Team PWC.

This week, we had `26 contributions` by guests in 11 different languages. I would like to `THANK` each and every guest contributors.

Scala is the new language introduced this week by `Frank Oosterhuis`.

While we are talking about contributions, lets share some interesting stats from the GitHub repository.

5) Stars: 79

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

RECAP

Quick recap of the “The Weekly Challenge - 081” by `Mohammad S Anwar`.

PERL REVIEW

Please checkout Perl solutions review of the “The Weekly Challenge - 080” by `Colin Crain`.

If you missed any past reviews then please checkout the collection.

RAKU REVIEW

Please checkout Raku solutions review of the “The Weekly Challenge - 080” by `Andrew Shitov`.

If you missed any past reviews then please checkout 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

2) Frank Oosterhuis, guest from Groningen, Netherlands.

Please find out How to contribute?, if you have any doubts.

Please give it a try to an excellent tool EZPWC created by respected member `Saif Ahmed` of Team PWC.

GUESTS

14) Walt Mankowski shared solutions to Task #1 and Task #2 in Python.

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

Submitted by:Niels van Dijke

You are given 2 positive numbers `\$M` and `\$N`.

Write a script to list all common factors of the given numbers.

Example 1:

``````Input:
\$M = 12
\$N = 18

Output:
(1, 2, 3, 6)

Explanation:
Factors of 12: 1, 2, 3, 4, 6
Factors of 18: 1, 2, 3, 6, 9
``````

Example 2:

``````Input:
\$M = 18
\$N = 23

Output:
(1)

Explanation:
Factors of 18: 1, 2, 3, 6, 9
Factors of 23: 1
``````

You are given 3 strings; `\$A`, `\$B` and `\$C`.

Write a script to check if `\$C` is created by interleave `\$A` and `\$B`.

Print `1` if check is success otherwise `0`.

Example 1:

``````Input:
\$A = "XY"
\$B = "X"
\$C = "XXY"

Output: 1
``````

EXPLANATION

``````"X" (from \$B) + "XY" (from \$A) = \$C
``````

Example 2:

``````Input:
\$A = "XXY"
\$B = "XXZ"
\$C = "XXXXZY"

Output: 1
``````

EXPLANATION

``````"XX" (from \$A) + "XXZ" (from \$B) + "Y" (from \$A) = \$C
``````

Example 3:

``````Input:
\$A = "YX"
\$B = "X"
\$C = "XXY"

Output: 0
``````

Last date to submit the solution 23:59 (UK Time) Sunday 18th October 2020.

SO WHAT DO YOU THINK ?

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