问题1363--Sorting Problem

1363: Sorting Problem

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

There are n integer numbers, and you should sort and output the odd numbers, even numbers and prime numbers.

输入

Two lines were inputed. The first line contains one integer number n ( 1<= n <= 100). The second line contains n integer numbers , separated by one or many spaces.

输出

You should output three lines. The first line is the odd numbers, and they should be sorted in ascending order. The second line is the even numbers, and they should be sorted in ascending order. The third line is the prime numbers, and they should be sorted in ascending order.

样例输入 Copy

10
1 5 8 2 4 7 9 6 11 10

样例输出 Copy

1,5,7,9,11
2,4,6,8,10
2,5,7,11

来源/分类

yehr