1 of 3
Fatalize
  • 38.4k
  • 5
  • 67
  • 160

Brachylog, 4 bytes

ℕ≜¬∈

Try it online!

Works for any list size and any integer magnitudes.

Takes input from the Output variable, and outputs to the Input variable.

Explanation

ℕ      We want a non-negative integer
 ≜     Assign a value such that… 
  ¬∈   …it is not an element of the list
Fatalize
  • 38.4k
  • 5
  • 67
  • 160