Skip to content

heimavinna

bradendubois edited this page Nov 8, 2021 · 7 revisions

Homework

ID: heimavinna

Difficulty: 1.1 - 1.3

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, just split the input at the semicolons, and if it is one value (no -), add this to a total. otherwise, split the values at the -, and add high - low + 1 to the total, to make both ends of the range included.

Clone this wiki locally