EDIT: In the interest of increasing the complexity, i've added more to the challenge.
In mathematics, a vampire number (or true vampire number) is a composite natural number v, with an even number of digits n, that can be factored into two integers x and y each with n/2 digits and not both with trailing zeroes, where v contains precisely all the digits from x and from y, in any order, counting multiplicity. x and y are called the fangs.
More about Vampire Number
Pseudovampire numbers are similar to vampire numbers, except that the fangs of an n-digit pseudovampire number need not be of length n/2 digits. Pseudovampire numbers can have an odd number of digits, for example 126 = 6×21.
Accept Numbers from command line or stdin
- "1260 = 21 * 60" (smaller fang first if the number is a Vampire.)
- "1261 is not a Vampire Number." (if the number is not a Vampire number)
- "126 = 6 * 21". (if the number is a Pseudovampire number)
EDIT: If the number has multiple fangs, display it so.
x = fang1a * fang1b = fang2a * fang2b