Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 데이터분석
- 파이썬
- 통계
- Deep Learning Specialization
- ADsP
- sklearn
- 머신러닝
- IRIS
- tableau
- 이코테
- SQLD
- 데이터 분석
- 자격증
- pandas
- pytorch
- Python
- 딥러닝
- matplotlib
- Google ML Bootcamp
- SQL
- 데이터 전처리
- 이것이 코딩테스트다
- scikit learn
- 데이터분석준전문가
- ML
- 시각화
- 태블로
- 코딩테스트
- r
- 회귀분석
Archives
- Today
- Total
함께하는 데이터 분석
[이것이 코딩테스트다] 이코테 파이썬 그리디 본문
거스름돈
n = int(input())
arr = [500, 100, 50, 10]
count = 0
for i in arr :
count += n // i
n %= i
print(count)
큰 수의 법칙
N, M, K = map(int, input().split())
data = list(map(int, input().split()))
data.sort()
summ = 0
i = 1
while i <= M :
if i % (K + 1) == 0 :
summ += data[N - 2]
else :
summ += data[N - 1]
i += 1
print(summ)
숫자 카드 게임
N, M = map(int, input().split())
result = []
for _ in range(N) :
data = list(map(int, input().split()))
result.append(min(data))
print(max(result))
1이 될 때까지
N, K = map(int, input().split())
result = 0
while True :
if N % K == 0 :
N //= K
else :
N -= 1
result += 1
if N == 1 :
break
print(result)
'코딩 테스트 > 이것이 코딩테스트다' 카테고리의 다른 글
[이것이 코딩테스트다] 이코테 파이썬 DFS/BFS (0) | 2023.08.07 |
---|---|
[이것이 코딩테스트다] 이코테 파이썬 이진 탐색 (0) | 2023.07.17 |
[이것이 코딩테스트다] 이코테 파이썬 정렬 (0) | 2023.07.15 |
[이것이 코딩테스트다] 이코테 파이썬 구현 (0) | 2023.07.14 |