1. 백준 - 1, 2, 3 더하기 4
N = int(input())
lst = [1] * 10001
for i in range(2, 10001):
lst[i] += lst[i - 2]
for i in range(3, 10001):
lst[i] += lst[i - 3]
for i in range(N):
n = int(input())
print(lst[n])
2. 백준 - ZOAC4
import math
H, W, N, M = map(int, input().split())
row = math.ceil(H / (N + 1))
col = math.ceil(W / (M + 1))
print(row * col)
3. 프로그래머스 - 프로세스
def solution(priorities, location):
answer = 0
max_location = priorities.index(max(priorities))
while True:
max_val = max(priorities)
if (priorities[max_location] == max_val):
priorities[max_location] = 0
answer += 1
if (max_location == location):
break
max_location += 1
if (max_location >= len(priorities)):
max_location = 0
return answer
4. 프로그래머스 - 주식가격
def solution(prices):
answer = [0] * len(prices)
for i in range(len(prices)):
cnt = 0
for j in range(i+1, len(prices)):
if prices[j] < prices[i]:
cnt += 1
break
else:
cnt += 1
answer[i] = cnt
return answer