uploaded at 2022. 12. 17. 오후 9:37:09

This commit is contained in:
rl544
2022-12-17 21:37:10 +09:00
parent dbacac86de
commit 4ab4ad80d4
@@ -0,0 +1,9 @@
// [문제 링크]: https://school.programmers.co.kr/learn/courses/30/lessons/12912
class Solution {
public long solution(int a, int b) {
long answer = 0;
for(int c = Math.min(a,b); c <= Math.max(a,b); c++) answer += c;
return answer;
}
}