Consecutive Sum
Created on Nov. 8, 2024 by Julien Palard
Write a function named find_consecutive_sum
that takes an integer
n
and returns a triplet of consecutive integers (a, b, c)
such
that a + b + c == n
.
In case no such triplet exists, your function should return None
.
Examples
>>> find_consecutive_sum(15)
(4, 5, 6)
>>> find_consecutive_sum(10)
None