Product Divisible by Sum?

Published by Helen Yu in

Write a function that returns True if the product of a list is divisible by the sum of that same list. Otherwise, return False.

Examples

divisible([3, 2, 4, 2]) ➞ False

divisible([4, 2, 6]) ➞ True
# 4 * 2 * 6 / (4 + 2 + 6)

divisible([3, 5, 1]) ➞ False

Notes

N/A

Watch a quick demo on how Edabit works.