Code&Data Insights

BaekJoon Algorithm - Stage 11 < Brute Force Search - 완전 탐색 > [ 2798 ]( Python 3 ) 본문

Algorithm/BaekJoon Online Judge

BaekJoon Algorithm - Stage 11 < Brute Force Search - 완전 탐색 > [ 2798 ]( Python 3 )

paka_corn 2022. 1. 28. 03:22

 

 

2022.01.27

 

 

 

# Stage 10  브루트 포스  - [2798]

 

브루트 포스 알고리즘은 주로 비밀번호를 해킹할 때 쓰이며, 주어진 숫자나 리스트의 모든 경우의 수를 고려해 될때까지 

시도해 보는 방식이다. 

 

[ 2798 ] - 블랙잭 

 

[ my code  ]

combinations(리스트, 인자값)

combinations()는 리스트 내의 모든 조합을 나타낸다.

 

 

 

 

++

 

from itertools import permutations

하나의 리스트에서 모든 순열

 

from itertools import combinations

하나의 리스트에서 모든 조합

 

from itertools import product

두개 이상의 리스트에서 모든 조합

 

 

 

 

 

 

 

Comments