eolymp
bolt
Try our new interface for solving problems
Problems

Negative elements

Negative elements

The sequence of $n$ real numbers is given. Find the sum and the number of negative elements in it. \InputFile The first line contains the number $n~(n \le 100)$ of sequence elements. In the next line $n$ real numbers --- the elements of sequence are given. Their values do not exceed $100$ by absolute value. \OutputFile Print in one line the number of negative elements and their sum with two digits after the decimal point.
Time limit 1 second
Memory limit 128 MiB
Input example #1
5
6 -7.5 2.1 -2.0 0

Output example #1
2 -9.50
Source SFE-2010 Variant 21