The arithmetic mean of negative odd numbers in the array
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given an array of n integers, your task is to calculate the arithmetic mean of the negative odd numbers within the array. If there are no negative odd numbers, output NO.
Input
The first line contains the integer n (1 ≤ n ≤ 100), representing the number of elements in the array. The second line contains n integers, each with an absolute value not exceeding 100.
Output
Print the arithmetic mean of the negative odd numbers, formatted to two decimal places. If there are no such numbers, print NO.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 665
Acceptance rate 28%