How to resolve the algorithm Vampire number step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Vampire number step by step in the Phix programming language

Table of Contents

Problem Statement

A vampire number is a natural decimal number with an even number of digits,   that can be factored into two integers. These two factors are called the   fangs,   and must have the following properties:

An example of a vampire number and its fangs:   1260 : (21, 60)

16758243290880, 24959017348650, 14593825548650

Note that a vampire number can have more than one pair of fangs.

Let's start with the solution: