This is the simple version of Fastest Code series. If you need some challenges, please try the [Performance version](http://www.codewars.com/kata/5714594d2817ff681c000783)

## Task: 
    
Give you a number array ```numbers``` and a number ```c```.

Find out a pair of numbers(we called them number a and number b) from the array ```numbers```, let a*b=c, result format is an array ```[a,b]```

The array ```numbers``` is a sorted array, value range: `-100...100`

The result will be the first pair of numbers, for example,```findAB([1,2,3,4,5,6],6)``` should return ```[1,6]```, instead of ```[2,3]```

Please see more example in testcases.



### Series:
 - [Bug in Apple](http://www.codewars.com/kata/56fe97b3cc08ca00e4000dc9)
 - [Father and Son](http://www.codewars.com/kata/56fe9a0c11086cd842000008)
 - [Jumping Dutch act](http://www.codewars.com/kata/570bcd9715944a2c8e000009)
 - [Planting Trees](http://www.codewars.com/kata/5710443187a36a9cee0005a1)
 - [Give me the equation](http://www.codewars.com/kata/56fe9b65cc08cafbc5000de3)
 - [Find the murderer](http://www.codewars.com/kata/570f3fc5b29c702c5500043e)
 - [Reading a Book](http://www.codewars.com/kata/570ca6a520c69f39dd0016d4)
 - [Eat watermelon](http://www.codewars.com/kata/570df12ce6e9282a7d000947)
 - [Special factor](http://www.codewars.com/kata/570e5d0b93214b1a950015b1)
 - [Guess the Hat](http://www.codewars.com/kata/570ef7a834e61306da00035b)
 - [Symmetric Sort](http://www.codewars.com/kata/5705aeb041e5befba20010ba)
 - [Are they symmetrical?](http://www.codewars.com/kata/5705cc3161944b10fd0004ba)
 - [Max Value](http://www.codewars.com/kata/570771871df89cf59b000742)
 - [Trypophobia](http://www.codewars.com/kata/56fe9ffbc25bf33fff000f7c)
 - [Virus in Apple](http://www.codewars.com/kata/5700af83d1acef83fd000048)
 - [Balance Attraction](http://www.codewars.com/kata/57033601e55d30d3e0000633)
 - [Remove screws I](http://www.codewars.com/kata/5710a50d336aed828100055a)
 - [Remove screws II](http://www.codewars.com/kata/5710a8fd336aed00d9000594)
 - [Regular expression compression](http://www.codewars.com/kata/570bae4b0237999e940016e9)
 - [Collatz Array(Split or merge)](http://www.codewars.com/kata/56fe9d579b7bb6b027000001)
 - [Tidy up the room](http://www.codewars.com/kata/5703ace6e55d30d3e0001029)
 - [Waiting for a Bus](http://www.codewars.com/kata/57070eff924f343280000015)

Source: codewars | Difficulty: EASY
Tags: Game theory

Ad-hoc

Starter code: def find_a_b(numbers,c):
	

Solutions:
def find_a_b(numbers, c):
	for (i, a) in enumerate(numbers, 1):
		for b in numbers[i:]:
			if a * b == c:
				return [a, b]


from itertools import combinations

def find_a_b(numbers, c):
	return next(([a, b] for (a, b) in combinations(numbers, 2) if a * b == c), None)


def find_a_b(numbers, c):
	for i in range(len(numbers) - 1):
		for j in range(i + 1, len(numbers)):
			if numbers[i] * numbers[j] == c:
				return [numbers[i], numbers[j]]


def find_a_b(numbers, c):
	return next(([a, c // a] for (i, a) in enumerate(numbers, 1) if a and c / a in numbers[i:]), None)


from collections import Counter

def find_a_b(nums, target):
	if len(nums) <= 1:
		return None
	if target == 0:
		zeros = nums.count(0)
		if zeros == 0:
			return None
		elif zeros == 1:
			return [0, nums[1]] if nums[0] == 0 else [nums[0], 0]
		else:
			return [nums[0], 0]
	counter = Counter(nums)
	for num in nums:
		if num != 0 and target % num == 0:
			complement = target // num
			if num == complement and counter[complement] >= 2 or (num != complement and counter[complement] >= 1):
				return [num, complement]


def find_a_b(numbers, c):
	for (i, x) in enumerate(numbers):
		for y in numbers[i + 1:]:
			if x * y == c:
				return [x, y]
	return None


find_a_b = lambda n, c: (list(filter(lambda x: x[0] * x[1] == c, [list(e) for e in __import__('itertools').combinations(n, 2)])) + [None])[0]


def find_a_b(numbers, c):
	for i in numbers:
		if i != 0 and c / i in numbers[numbers.index(i) + 1:]:
			return [i, c / i]


from collections import Counter

def find_a_b(numbers, c):
	cnt = Counter(numbers)
	for a in numbers:
		try:
			(q, r) = divmod(c, a)
		except ZeroDivisionError:
			continue
		nums = cnt[q]
		if r == 0 and (nums > 1 if q == a else nums == 1):
			return [a, q]