scientific_comp_projects/CODE/[python]kattis/trivial/homework.py
2021-10-29 15:16:40 +02:00

15 lines
318 B
Python

problems = input()
problems = problems.split(';')
all_prob = []
for problem in problems:
if '-' in problem:
start, stop = problem.split('-')
for i in range(int(start), int(stop)+1):
all_prob.append(i)
else:
all_prob.append(int(problem))
print(len(set(all_prob)))