✔ 문제
✔ 해결
class Solution {
public int solution(int a, int b) {
long answer = 0;
int min, max = 0;
if(a >= b) {
max = a;
min = b;
}else{
max = b;
min = a;
}
if(a == b) {
answer = min;
}else {
for(int i = min; i <= max; i++) {
answer += i;
}
}
return answer;
}
}