Skip to content

Commit c846711

Browse files
committed
[level 1] Title: 삼총사, Time: 0.04 ms, Memory: 11.3 MB -BaekjoonHub
1 parent 8a89768 commit c846711

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

프로그래머스/1/131705. 삼총사/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 성능 요약
66

7-
메모리: 10.2 MB, 시간: 0.03 ms
7+
메모리: 11.3 MB, 시간: 0.04 ms
88

99
### 구분
1010

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

1717
### 제출 일자
1818

19-
2024년 07월 05일 03:57:28
19+
2026년 07월 26일 15:23:06
2020

2121
### 문제 설명
2222

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import itertools
1+
from itertools import combinations
22

33
def solution(number):
4-
cnt = 0
5-
for i in itertools.combinations(number, 3):
6-
if sum(i) == 0:
7-
cnt += 1
8-
return cnt
4+
ans = 0
5+
for j in combinations(number, 3):
6+
if sum(j) == 0:
7+
ans += 1
8+
return ans

0 commit comments

Comments
 (0)