Except for the smallest and the largest
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
An array of N integers is provided as input. The task is to calculate the sum of the array's elements, excluding all instances of its smallest and largest values.
Input
The first line contains a natural number N. The second line contains N integers. Each integer has an absolute value not exceeding 100.
Output
Output the calculated sum.
Examples
Input #1
Answer #1
Submissions 9K
Acceptance rate 48%