Skip to content
Onsite

Update and Compare

EasyP3Coding

Return [first, second], where first is whether num1 > num2 and second is whether num1 + num3 > num2.

Example 1

Input
num1 = 5, num2 = 3, num3 = 1
Output
[true,true]

Example 2

Input
num1 = 3, num2 = 5, num3 = 1
Output
[false,false]
Why
3 is not above 5, and 3 + 1 = 4 is not above 5.

Example 3

Input
num1 = 3, num2 = 5, num3 = 2
Output
[false,false]
Why
3 + 2 = 5 is still not above 5.

Constraints

  • -10^9 <= num1, num2, num3 <= 10^9

Hints

Run checks the 3 visible tests, Submit all 8.