Let M
– the sum of 5
of the maximum non-trivial divisors of an integer (not counting one and the number itself). If the number does not have 5
non-trivial divisors, then the M
value is considered equal to zero.
Write a program that iterates over the integers less than 20 000 000
, in descending order and finds among them the first 5 for which the value 0 < M < 10 000 000
and in M there is only one even digit
.
Print the first five found numbers and their corresponding values M
.
Output format: for each of the five such found numbers in a separate line, the number itself is displayed first, then – value M
(separated by one space). Lines are displayed in descending order of found numbers.