Skip to content

beatspread

bradendubois edited this page Oct 7, 2021 · 7 revisions

Beat the Spread!

ID: beatspread

Difficulty: 2.5

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, consider that the sum would be two numbers, and the difference is the second number given. The higher number is the sum plus the difference, divided by two; the low would be a, minus this number. If the sum were smaller than the difference, or the sum of the two numbers were odd, then output "impossible".

Clone this wiki locally