1 parent 1f38a9f commit 814a489Copy full SHA for 814a489
2 files changed
프로그래머스/1/12912. 두 정수 사이의 합/README.md
@@ -1,10 +1,10 @@
1
# [level 1] 두 정수 사이의 합 - 12912
2
3
-[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12912)
+[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12912?language=java)
4
5
### 성능 요약
6
7
-메모리: 10.3 MB, 시간: 0.29 ms
+메모리: 74.3 MB, 시간: 8.58 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 06월 24일 19:50:40
+2026년 06월 18일 16:55:17
20
21
### 문제 설명
22
프로그래머스/1/12912. 두 정수 사이의 합/두 정수 사이의 합.java
@@ -0,0 +1,13 @@
+import java.math.*;
+
+class Solution {
+ public long solution(int a, int b) {
+ long answer = 0;
+ int c = Math.min(a, b);
+ int d = Math.max(a, b);
+ for (int i = c;i <= d; i++){
+ answer += i;
+ }
11
+ return answer;
12
13
+}
0 commit comments