We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a89768 commit c846711Copy full SHA for c846711
2 files changed
프로그래머스/1/131705. 삼총사/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 10.2 MB, 시간: 0.03 ms
+메모리: 11.3 MB, 시간: 0.04 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 07월 05일 03:57:28
+2026년 07월 26일 15:23:06
20
21
### 문제 설명
22
프로그래머스/1/131705. 삼총사/삼총사.py
@@ -1,8 +1,8 @@
1
-import itertools
+from itertools import combinations
2
3
def solution(number):
- cnt = 0
- for i in itertools.combinations(number, 3):
- if sum(i) == 0:
- cnt += 1
- return cnt
+ ans = 0
+ for j in combinations(number, 3):
+ if sum(j) == 0:
+ ans += 1
+ return ans
0 commit comments