Олимпиадный тренинг

Задача 38952. Training task - 4


Задача

Темы: ЕГЭ
Let M – the sum of simple natural divisors of an integer, not counting one and the number itself, and KM is the number of such divisors. If the number does not have such divisors, then the M value is considered equal to zero.
Write a program that iterates over integers greater than 2 560 000, in ascending order and searches among them for those for which M is odd and КM= 6. 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 ascending order of found numbers.