<jupyter_start><jupyter_text>2021년 10월 14일 목요일 BaekJoon - 블랙잭 (Python)  문제 : https://www.acmicpc.net/problem/2798 블로그 : https://somjang.tistory.com/entry/BaekJoon-2798%EB%B2%88-%EB%B8%94%EB%9E%99%EC%9E%AD-Python  Solution<jupyter_code>from itertools import combinations

def blackjack(M, card_numbers):
    comb_3 = list(combinations(card_numbers, 3))
    
    sum_list = [sum(comb) for comb in comb_3 if sum(comb) <= M]
    
    return max(sum_list)


if __name__ == "__main__":
    N, M = map(int, input().split())
    
    card_numbers = list(map(int, input().split()))
    
    print(blackjack(M, card_numbers))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14883720930232558, 'fraction_numerical': 0.04496124031007752, 'mean_word_length': 4.383333333333334, 'pattern_counts': {'":': 1, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '659391', 'license': 'MIT', 'n_tokens_mistral': 293, 'n_tokens_neox': 281, 'n_words': 44, 'path': 'DAY 501 ~ 600/DAY512_[BaekJoon] 블랙잭 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '645'}