total. Find three consecutive integers (they may be negative) that add up to total, and return them in increasing order.
If no such integers exist, return an empty list.total=21 → [6, 7, 8]
6 + 7 + 8 = 21.
total=10 → []
The sum of three consecutive integers is always a multiple of 3, and 10 is not.
total=0 → [-1, 0, 1]
The integers may be negative: −1 + 0 + 1 = 0.
total=21
[6, 7, 8]
Run checks the first 3 tests in your browser. Submit checks all 53 tests on the server, hidden ones included.