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
1 2 |
|
1 2 |
|
There's no corrections yet, hit the `Submit` button to send your code to the correction bot.
Keyboard shortcuts:
- Ctrl-Enter: Send your code to the correction bot.
- Escape: Get back to the instructions tab.