12542 - Tsai DS 20191205 TwoSum Specific Solution   

Description

Give an array of integers and a target number, return two integers such that they add up to the specific target number.

The output is unique! You may not use the same element twice.

1. Each integer in the given array is a positive number and smaller than 1 million.

2. The target number is small than 1million.  

 

Input

The first line is the array's size.

The second line is the array of integers.

The third line is the target number.

Output

The outputs are two integers from the input array that they add up to the target number.

The left number is smaller than the right one.

Sample Input  Download

Sample Output  Download

Tags




Discuss