|
|||
DivisorsWrite a program that reads positive integers from each line of the standard input until end-of-file (EOF). The first number of each line determines how many additional numbers are given in that line. For each line, the program should sort the numbers in ascending order of the (positive) number of their divisors. If two or more numbers have the same number of divisors, sort them in ascending order of magnitude. Write each ordered sequence of numbers in a separate line, separating the elements of a sequence from each other with a single space character. Sample Input
Output for Sample Input
Acknowledgement
This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |