給定一個正整數目標值(稱為target)和一個正整數陣列(共5個正整數,稱為numberArray),請判斷整數陣列(numberArray)中哪兩個正整數相加會得到 target目標值,並將兩數輸出。
Note:
正整數陣列 numberArray 必由小到大排列
e.g.
(o) 1 2 3 4 5
(x) 4 3 5 1 2
陣列中的數字必不重複出現
e.g.
(o) 1 2 3 4 5
(x) 1 1 1 3 3
需考慮的情況:
無解
一組解
多組解
Sample IO
無解
Input:
10
1 2 3 4 5
Output:
No match answer.
一組解
Input:
9
1 2 3 4 5
Output:
(4, 5)
*不重複輸出相同組合 ((4, 5), (5, 4))
多組解
Input:
6
1 2 3 4 5
Output:
(1, 5)
(2, 4)
*不重複輸出相同組合 ((1, 5), (5, 1) / (2, 4), (4, 2))
一個正整數target,ㄧ個正整數陣列numberArray(共5個正整數 *n1 *n2 *n3 *n4 *n5)
Note:
輸出比須符合以下格式:
無解:
No match answer.
有一組解:
(n1, n5)
多組解:
(n1, n5)
(n2, n4)
Note:
輸出的最後必須要有一個換行符號 (“\n”)
請注意有解時,輸出的括號中,逗號之後有一空格