Skip to content

Conversation

@heeheejj
Copy link
Contributor

PRG 42842 카펫

프로그래머스 코딩테스트 고득점 kit > 완전탐색

🚩 설계

yellow를 소인수분해해서, i와 yellow//i로 나타낼 수 있다.
brown == 2*(i+2) + 2*(yellow//i+2) - 4(겹치는부분) 이라는 식이 나오는데,
간소화하면 2*(i + yellow//i)+4 == brown이라 할 수 있다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant