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 | 29 | 30 | 31 |
Tags
- 네이버 ai 부스트캠프
- Focal Loss
- labelsmoothing
- autograd
- mmdetectionv3
- 밑바닥부터 시작하는 딥러닝
- objectdetection
- layernormalization
- DataAugmentation
- labelsmoothingloss
- pytorch
- 힙
- ImageClassification
- cmp_to_key
- 중복순열
- 프로그래머스
- inference
- fasterRCNN
- Optimizer
- f1loss
- l2penalty
- 우선순위큐
- BatchNormalization
- 네이버AI부스트캠프
- ComputerVision
- 정렬
- focalloss
- 자료구조끝판왕문제
- noiserobustness
- clibration
Archives
- Today
- Total
HealthyAI
Programmers) level2. 카펫 본문
반응형
def solution(brown, yellow):
tot = brown + yellow
for i in range(3, int(tot ** 0.5) + 1): # 한 변의 길이는 2보다 커야 된다.
if tot % i == 0:
a = i
b = tot / a
# 두 변에서 2 씩 뺀 길이의 합에 2배를 하면 갈색 타일의 모퉁이를 제외한 개수를 알수 있다.
if brown - 4 == (a-2+b-2) * 2:
return [b, a]
반응형
'Coding test > 프로그래머스' 카테고리의 다른 글
Programmers) level2. 전력망 둘로 나누기 (0) | 2023.01.16 |
---|---|
Programmers) level2. 피로도 (0) | 2023.01.16 |
Programmers) level2. 소수찾기 (0) | 2023.01.16 |
Programmers) level1. 모의고사 (0) | 2023.01.16 |
Programmers) level2. 모음 사전 (0) | 2023.01.16 |