``There are choice cuts of beef, choice art, cars that are (at least according to Ferris Bueller) choice, so why are there no choice numbers?'' rants Larry Coro, a rather reversed, somewhat deranged mathematician.This is typical for the Plaza, where people holding very strange views tend to gather around lunchtime. Perhaps they gather for the food, or perhaps the food is what shoves their minds off that delicate balance called sanity. You don't know; you don't care. What you care about is getting this crazy guy out of your face.
``So, I've come up with a neat way to put numbers on equal footing with beef,'' he says as you try your patented dodge-the-crazy-guy move. It doesn't work.
``All I need is a little computer help to find out just which ones are choice...''
A number is considered choice if one of its factors is also the number of factors of the number. For instance, the number 24 has 8 factors: 1, 2, 3, 4, 6, 8, 12, 24. Eight is itself one of those factors, so 24 is considered choice. Eleven is not choice, as 2, the number of factors, is not a factor of 11.
A number's factors are all the positive integers which evenly divide the number, giving no remainder.
The output must give all the choice numbers in one block and all the non-choice numbers in another. Order is not important.
Example 2:
Enter numbers to test: 1946 35 200 0
No choice numbers were given.
Non-choice numbers: 1946, 35, 200
Example 4:
Enter numbers to test: 4 16 32 512 24 0
Choice numbers: 24
Non-choice numbers: 4, 16, 32, 512
Example 5:
Enter numbers to test: 18 227 9 1048 32104 502 503 504 505 506 0
Choice numbers: 18, 9, 1048, 32104, 504
Non-choice numbers: 227, 502, 503, 505, 506