uploaded at 2022. 12. 17. 오후 9:37:09
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user