OpenJudge - 15:Sum is K
描述
Given a sequence of N numbers. Find different numbers A and B in the sequence so that the sum of A and B equals to K.
输入
First line: two positive integers N (N <= 1000) and K (K <= 1000000).
Second line: N positive integers (<= 1000000).
输出
Two integers A and B.
翻译:
给定N个数的序列。找到序列中的两个不同的数A和B并且A和B的和等于K
输入:
第一行:两个正整数N和K
第二行:两个数A和B