def solution(a, b): if a == b: return a answer = 0 if a>b: for i in range(b,a+1): answer += i if a<b: for i in range(a,b+1): answer += i return answer