1082: 数组的平均值

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:max
Submit:41 Solved:14

Description

给定一个整数数组,找出数组中所有正数的平均值和所有负数的平均值。数组的长度为n(1 < n < 100)。

Input

第一行:一个整数n。 第二行:n个空格隔开的整数。

Output

第一行:所有正数的平均值(如果正数个数为0,则输出“None”) 第二行:所有负数的平均值(如果负数个数为0,则输出“None”)

Sample Input Copy

5
-1 2 3 -4 5

Sample Output Copy

3.33
-2.50