E |
Extreme
Discrete Summation |
Given set S what is the value of the right hand side of the
following assignment? In other words
what is the value of A.
For example if S={1.2, 3.6, 4.1} then the possible values for variable is 1.2, 3.6 or 4.1. The same is true for variables , , , ,,,. Here means the nearest smaller integer value of x (floor function). For example , , .
The input file contains
100 sets of inputs. The description of each set is given below:The input for each set is contained in a single line. This
line starts with an integer N(0<N<101) which
denotes how many numbers are in the set S. This integer is followed by N
non-negative floating-point numbers in the same line. To make things easy with
floating-point numbers and to avoid precision problems these numbers have only
a single digit after the decimal point. Also the values of any of these numbers
are not greater than 1000.
Input is terminated by line containing a single zero.
For each set of input
produce one line of output. This line contains an integer which denotes the
value of A.
1 11.4 |
3 |
Problem Setter : Shahriar Manzoor
Special Thanks : Derek Kisman