How to resolve the algorithm Gapful numbers step by step in the Fōrmulæ programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Gapful numbers step by step in the Fōrmulæ programming language

Table of Contents

Problem Statement

Numbers   (positive integers expressed in base ten)   that are (evenly) divisible by the number formed by the first and last digit are known as   gapful numbers.

Evenly divisible   means divisible with   no   remainder.

All   one─   and two─digit   numbers have this property and are trivially excluded.   Only numbers   ≥ 100   will be considered for this Rosetta Code task.

187   is a   gapful   number because it is evenly divisible by the number   17   which is formed by the first and last decimal digits of   187.

About   7.46%   of positive integers are   gapful.

Let's start with the solution: