Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Duplicate
The description should have said that delta > 0 or, to make the problem a little bit harder, there could be cases in which delta <= 0.
Is it guaranteed that there won't be any input which results in negative discriminant?
The description should have said x1 < x2 or somewhat. If coders calculated in the reversed sequence, the answer will become x1 > x2, which cannot pass the tests.
The second option is to check if x1(coder) == x2(answer) and x2(coder) == x1(answer). If they are true, the tests should also be passed.