일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- set to list
- Python 나머지
- list.sorted()
- string
- homebrew-core is a shallow clone.
- permutations
- list to set
- sort()
- 피보나치 수
- python3
- List to String
- sting position
- COUNT
- Unknown command: cask
- Python
- Modified Date
- cask
- 알고리즘 풀이
- List
- zip()
- Boto3
- index
- Algorithm
- RecursionError
- 알고리즘
- List 초기화
- Python 몫
- Split
- list.pop(0)
- 프로그래머스
- Today
- Total
목록Algorithm (2)
데이터와 코드로 세상을 바라봅니다.

def solution(N, stages): answer = [] #각 스테이지 별로 실패 인원 COUNT #스테이지 별로 실패율 계산 #MAX INDEX 활용하여 계산 stages_fail = [0] * (N+1) fail_rate = [0] * N member = len(stages) for i in range(0, len(stages)): stages_fail[stages[i]-1] = stages_fail[stages[i]-1]+1 for j in range(0, N) : fail_rate[j] = stages_fail[j] / member member = member - stages_fail[j] if member
def solution(answers): answer = [] answer1 = [1, 2, 3, 4, 5] answer2 = [2, 1, 2, 3, 2, 4, 2, 5, 2, 1, 2, 3, 2, 4, 2, 5] answer3 = [3, 3, 1, 1, 2, 2, 4, 4, 5, 5, 3, 3, 1, 1, 2, 2, 4, 4, 5, 5] data = {'1': 0, '2': 0, '3': 0} for i in range(0,len(answers)): if answer1[i%len(answer1)] == answers[i] : data['1'] += 1 if answer2[i%len(answer2)] == answers[i] : data['2'] += 1 if answer3[i%len(answer3)] ..