[프로그래머스] 정수 삼각형
문제
def solution(triangle):
total = [[triangle[0][0]]]
for dy in range(1, len(triangle)):
stair_max = []
for dx in range(len(triangle[dy])):
if dx == 0:
max_val = total[dy - 1][0] + triangle[dy][dx]
elif dx == len(triangle[dy]) - 1:
max_val = total[dy - 1]...
[프로그래머스] 숫자 카드 나누기
문제
import math
def find(arr):
gcd_value = arr[0]
for num in arr[1:]:
gcd_value = math.gcd(gcd_value, num)
return gcd_value
def solution(arrayA, arrayB):
gcd_a = find(arrayA)
gcd_b = find(arrayB)
answer_a = gcd_a if all(num % gcd_a != 0 for num in arrayB) else 0
answer_b = gcd_b if all(num % gcd_b != 0 f...
DreamFusion: Text-To-3D Using 2D Diffusion
Abstract
최근 수십억개의 image-text쌍으로 학습된 text-to-image 합성을 위한 Diffusion모델이 발전해왔다. 이것을 3D에도 적용하고자 했지만, 라벨링된 대규모의 3D 데이터셋과 효율적인 모델 구조가 없었다.
해당 연구에서는 이런 한계를 극복하기 위해 사전 훈련된 2D Text-to-Image Diffusion 모델을 사용하여 Text-3D 합성을 수행하고자 한다.
Probability density distillation에 기반한 loss를 도입하여, 2D 확산 모델을 매개변수화된 image generator의 최적화를 위한 prior로 사용할 수 있게 한다.
이...
[프로그래머스] 호텔 대실
문제
def solution(book_time):
# 시간을 분으로 변환
times = []
for i in book_time:
start = i[0]
end = i[1][:-2] + str(int(i[1][-2:]) + 10)
start_h, start_m = map(int, start.split(":"))
start_minutes = start_h * 60 + start_m
end_h, end_m = map(int, end.split(":"))
end_minutes = end_h * 60 + end...
[프로그래머스] 124 나라의 숫자
문제
def solution(n):
answer = ""
# 3으로 나눈 나머지 값을 인덱스로 한다 했을 때, num의 순서
num = ["4", "1", "2"]
while n > 0:
# 3으로 나눈 나머지 계산
t = n % 3
# 3으로 나눈 나머지를 인덱스로 num에서 숫자를 가져옴
answer = num[t] + answer
# n을 다시 계산
n = (n - 1) // 3
return answer
99 post articles, 20 pages.