#K62947. Finding Sum of Two

    ID: 31644 Type: Default 1000ms 256MiB

Finding Sum of Two

Finding Sum of Two

Given a list of integers, determine if there exists an element in the list that can be expressed as the sum of two other distinct elements. In other words, check if there exist distinct indices (i), (j), and (k) such that (a_k = a_i + a_j).

This problem tests your ability to iterate through arrays and handle basic arithmetic operations efficiently.

inputFormat

The input is read from standard input (stdin). The first line contains a single integer (n), representing the number of elements in the list. The second line contains (n) space-separated integers which are the elements of the list. Note that (n) can be zero.

outputFormat

Output a single line to standard output (stdout) containing either (True) or (False), indicating whether there exists an element in the list which is the sum of two other distinct elements.## sample

4
1 2 3 4
True