// 두 정수 사이의 합 - 연습문제
public class Sumof2N {
public long solution(int a, int b) {
long sum = 0;
for (int i = Math.min(a, b); i <= Math.max(a, b); i++) {
sum += i;
}
return sum;
}
public static void main(String[] args) {
Sumof2N s = new Sumof2N();
System.out.println(s.solution(3, 3));
}
}