ps3 [프로그래머스 | 파이썬] 카펫 (완전탐색 / level 2) 문제 https://school.programmers.co.kr/learn/courses/30/lessons/42842 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 코드 def solution(brown, yellow): answer = [] for i in range(3, int((brown + yellow)**0.5)+1): if (brown + yellow) % i == 0 and (i-2) * (((brown+yellow) // i) - 2) == yellow: answer = [(brown+yellow) // i, i] return answer.. 2022. 12. 28. 알고리즘2. 수학적 배경지식 1. Analyzing Algorithms and Problems: Principles and Examples 1-2. Mathematical Background 수학적배경지식 Analysis Tool: Mathematics - series: 숫자들의 나열(sequence)의 합 - Arithmetic series: 연속적으로 증가하는 정수들의 합 - Polynomial Series 다항식 시리즈 -The sum of squares -The general case is - Power of 2 -Arithmetic-Geometric Series Analysis Tool: Logic(논리학) Logic: 더 명확한 추론을 위해 자연어를 formalizing(수학적으로 형식화)하는 시스템 A ⇒ B A imp.. 2021. 9. 2. 알고리즘 1. Problem Solving의 절차 1. Analyzing Algorithms and Problems: Principles and Examples -알고리즘 & 문제 complexity 분석 1-1. Introduction 컴퓨터 알고리즘 상세한 단계별(step-by-step) 방법으로 유한 시간(finite time) 이내 컴퓨터를 이용해 문제를 해결하는 것 Problem Solving의 체계적 절차 Problem(문제 정의) > Strategy(문제풀이 전략) > Algorithm(알고리즘, 의사코드 서술) > Anaysis(서술한 알고리즘을 분석) > Implementation(구현) > Verification(검증) 1. Problem 문제 정의 ex. 비정렬 배열을 정렬하는 알고리즘 input : 5, 3, 67, 1, 2 -> .. 2021. 9. 2. 이전 1 다음 반응형