| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
- Python
- 우선순위큐
- 합 구하기
- 백준
- JPA
- 그리디 알고리즘
- c#
- python3
- popleft
- BFS
- spring
- 인프런
- 소수판별
- deque
- DP
- 브루투포스
- 완전탐색
- LCM
- unity
- appendleft
- 연관관계
- 프로그래머스
- 소수찾기
- 파이썬
- Java
- C#강의
- 1일1솔
- mvc
- pypy3
- 누적합
- Today
- Total
목록전체 글 (139)
jae_coding
문제 문제 링크 코드 import sys input = sys.stdin.readline n = int(input()) C = list(int(input()) for _ in range(n)) C.sort() result = 0 count = 0 while C: count += 1 x = C.pop() if count % 3 != 0: result += x print(result)
문제 문제 링크 코드 import sys input = sys.stdin.readline def tip(money, idx): return money - (idx - 1) n = int(input()) lst = list(int(input()) for _ in range(n)) lst.sort(reverse=True) result = 0 for i in range(n): t = tip(lst[i], i+1) if t >= 0: result += t print(result)
문제 문제 링크 코드 import sys input = sys.stdin.readline n = int(input()) temp = n flag = False count = 0 if int(n / 5) > 0: count += int(n / 5) n = n - 5 * int(n / 5) while n != 0: if n % 2 == 0: count += int(n / 2) n = n - 2 * int(n / 2) else: count -= 1 n += 5 if temp < n: flag = True if flag: print(-1) else: print(count)