2021级《程序设计原理及C语言》练习题

A. Max, Min and Avg

单点时限: 2.0 sec

内存限制: 256 MB

Input several one blank separated integers, output the maximum, minimum and average (with %.2f format) of all positive integers separated by a space in one line and those of all negative integers in next line.

输入格式

There are no more than $10^6$ integers. Every one of them can be stored in a signed 32-bit integer. It is guaranteed that there is at least one positive integer and at least one negative integer.

样例

Input
-1 -2 -3 -4 -5 -6 1 2 3 4
Output
4.00 1.00 2.50
-1.00 -6.00 -3.50