AFA Function
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a sequence of n integers. By definition, AFA(i, j) is the sum of all elements of the specified sequence between the indices i and j, inclusive, for 0 ≤ i ≤ j < n. Find the minimum of the function.
Input
The inputs are two lines: the first contains the number N (1 ≤ N ≤ 2000), the second - a sequence of N numbers. The value of any element of a sequence to the module does not exceed 100. The numbers are separated by spaces.
Output
Bring minimum of AFA.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 45%