Skip to content

Commit 2ea6926

Browse files
committed
[level 1] Title: 두 정수 사이의 합, Time: 459.28 ms, Memory: 11.6 MB -BaekjoonHub
1 parent d92d1ae commit 2ea6926

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

프로그래머스/1/12912. 두 정수 사이의 합/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [level 1] 두 정수 사이의 합 - 12912
22

3-
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12912)
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12912?language=python3)
44

55
### 성능 요약
66

7-
메모리: 80.4 MB, 시간: 8.58 ms
7+
메모리: 11.6 MB, 시간: 459.28 ms
88

99
### 구분
1010

@@ -16,7 +16,7 @@
1616

1717
### 제출 일자
1818

19-
2026년 06월 21일 13:39:18
19+
2026년 07월 14일 12:02:31
2020

2121
### 문제 설명
2222

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
def solution(a, b):
2-
return sum([i for i in range(min(a, b), max(a, b) + 1)])
2+
ans = 0
3+
for i in range(min(a, b) ,max(a, b)+1):
4+
ans += i
5+
return ans

0 commit comments

Comments
 (0)