0
Sum over an Interval
Inspired by this challenge.
The goal is to sum an interval of integers, both inclusive and exclusive, and output the total to stdout.
Input regex: [\(\[]\d+,\d+[\)\]]
Examples:
Input -> Output
[2,6] -> 20
(15,25] -> 205
[0,16) -> 120
(15,20) -> 70
[1,2) -> 1
(2,12] -> 75
[11...