from itertools import permutations
def sosu(n):
cnt = 0
if (n != 1):
for i in range(1, int(n**0.5)+1):
if (n % i == 0):
cnt += 1
return 1 if cnt==1 else 0
def solution(numbers):
arr = []
for i in range(1, len(numbers)+1):
for j in permutations(numbers, i):
arr.append( int("".join(list(j))) )
arr = list(set(arr))
return sum([sosu(k) for k in arr])
코드가 너무 많고, 내 코드도 복잡하진 않아보여서 skipp
드디어 Level.2에 진입했다!