Perl Weekly Challenge 172: Prime Partition and Five-Number Summary
These are some answers to the Week 172 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on July 10, 2022 at 23:59). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Prime Partition
You are given two positive integers, $m and $n.
Write a script to find out the Prime Partition of the given number. No duplicates allowed.
For example,
Input: $m = 18, $n = 2
Output: 5, 13 or 7, 11
Input: $m = 19, $n = 3
Output: 3, 5, 11

