File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### 성능 요약
66
7- 메모리: 9.48 MB, 시간: 5.91 ms
7+ 메모리: 11.5 MB, 시간: 3.16 ms
88
99### 구분
1010
1616
1717### 제출 일자
1818
19- 2025년 04월 12일 13:33:59
19+ 2026년 07월 01일 21:47:21
2020
2121### 문제 설명
2222
Original file line number Diff line number Diff line change 11from itertools import permutations
22
3- def isPrime (n ):
4- for i in range (2 , int (n ** 0.5 )+ 1 ):
5- if n % i == 0 :
6- return False
3+ def is_prime (n ):
4+ if n < 2 : return False
5+
6+ for i in range (2 , int (n ** 0.5 ) + 1 ):
7+ if n % i == 0 :
8+ return False
79 return True
810
9- def solution (numbers ):
11+
12+ def solution (numbers ):
1013 A = set ()
1114 for i in range (1 , len (numbers )+ 1 ):
1215 for j in permutations (list (numbers ), i ):
1316 A .add (int ("" .join (j )))
1417
1518 cnt = 0
1619 for i in A :
17- if 2 <= i and isPrime (i ):
20+ if is_prime (i ):
1821 cnt += 1
1922 return cnt
You can’t perform that action at this time.
0 commit comments