Perl Weekly Challenge 116: Number Sequence and Sum of Squares
These are some answers to the Week 116 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (June 13, 2021). 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: Number Sequence
You are given a number
$N
>= 10.*Write a script to split the given number such that the difference between two consecutive numbers is always 1 and it shouldn’t have leading 0.*
Print the given number if it impossible to split the number.
Example: