The Weekly Challenge - 085

Monday, Nov 2, 2020| Tags: Perl, Raku

TABLE OF CONTENTS


1. HEADLINES

2. RECAP

3. PERL REVIEW

4. RAKU REVIEW

5. CHART

6. NEW MEMBERS

7. GUESTS

8. TASK #1: Triplet Sum

9. TASK #2: Power of Two Integers


HEADLINES


Congratulations Team PWC for crossing the magic number 7th consecutive weeks. Well done and keep it up.

Contributions Summary

Today is the first Monday of the month and time to declare the Champion.

With great pleasure, we declare, Andrew Shitov, as Champion of the Month. Andrew joined the team in the Week 065 and has contributed Raku: 36, Perl: 1 and BLOG: 23 as of today.

Let us welcome Samir Parikh and Kai Burgdorf to the Team PWC.

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

Languages Summary


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

1) Commits: 10,929 (+236)

2) Pull Requests: 2,675 (+52)

3) Contributors: 142 (+2)

4) Fork: 176 (+3)

5) Stars: 81


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


PERL REVIEW


Please checkout Perl solutions review of the “The Weekly Challenge - 084” 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 - 084” 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


1) Samir Parikh, Perl hacker.

2) Kai Burgdorf, Perl hacker.


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


1) Abigail shared solutions to Task #1 and Task #2 in Awk.

2) Abigail shared solutions to Task #1 and Task #2 in C.

3) Abigail shared solutions to Task #1 and Task #2 in Node.

4) Abigail shared solution to Task #1 in Bc.

5) Frank Oosterhuis shared solution to Task #1 in Scala.

6) Lubos Kolouch shared solutions to Task #1 and Task #2 in Python.

7) Myoungjin Jeon shared solutions to Task #1 and Task #2 in Elm.

8) Myoungjin Jeon shared solutions to Task #1 and Task #2 in Go.

9) Myoungjin Jeon shared solutions to Task #1 and Task #2 in Haskell.

10) Nuno Vieira shared solutions to Task #1 and Task #2 in JavaScript.

11) Roger Bell_West shared solutions to Task #1 and Task #2 in Python.

12) Roger Bell_West shared solutions to Task #1 and Task #2 in Ruby.

13) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Clojure.

14) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Lua.

15) Ulrich Rieke shared solution to Task #1 in Haskell.


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


TASK #1 › Triplet Sum

Submitted by: Mohammad S Anwar

You are given an array of real numbers greater than zero.

Write a script to find if there exists a triplet (a,b,c) such that 1 < a+b+c < 2. Print 1 if you succeed otherwise 0.

Example 1:

Input: @R = (1.2, 0.4, 0.1, 2.5)
Output: 1 as 1 < 1.2 + 0.4 + 0.1 < 2

Example 2:

Input: @R = (0.2, 1.5, 0.9, 1.1)
Output: 0

Example 3:

Input: @R = (0.5, 1.1, 0.3, 0.7)
Output: 1 as 1 < 0.5 + 1.1 + 0.3 < 2


TASK #2 › Power of Two Integers

Submitted by: Mohammad S Anwar

You are given a positive integer $N.

Write a script to find if it can be expressed as a ** b where a > 0 and b > 1. Print 1 if you succeed otherwise 0.

Example 1:

Input: 8
Output: 1 as 8 = 2 ** 3

Example 2:

Input: 15
Output: 0

Example 3:

Input: 125
Output: 1 as 125 = 5 ** 3


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


SO WHAT DO YOU THINK ?

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

Contact with me