본문 바로가기
728x90
반응형

코딩3

[Codility] Lesson10 - Prime and composite numbers: MinPerimeterRectangle Problem n integer N is given, representing the area of some rectangle. The area of a rectangle whose sides are of length A and B is A * B, and the perimeter is 2 * (A + B). The goal is to find the minimal perimeter of any rectangle whose area equals N. The sides of this rectangle should be only integers. For example, given integer N = 30, rectangles of area 30 are: (1, 30), with a perimeter of 6.. 2021. 1. 30.
코딩테스트 사이트 - Codility 사용법 안녕하세요! 오늘은 Codility사용법에 대해서 포스팅해보려고 합니다. Codility 는 코딩 테스트 사이트로, 다양한 알고리즘 문제를 풀어볼 수 있는 사이트 입니다. 우아한형제, 이스트소프트, 네이버 등에서 코딩테스트를 진행할 때 위 사이트를 이용해서 코딩테스트를 봅니다. 아래는 codility 사이트 입니다. www.codility.com/ Tech Recruiting Platform, Remote Online Code Testing | Codility Codility is a software platform that helps technical recruiters run remote interviews and hire strong engineers. Explore our platform by r.. 2020. 12. 14.
[백준] 2085 나무자르기 (이분탐색) How to solve 이 문제는 이분탐색으로 푸는 문제이다! 자세한 풀이는 다음과 같다 1. vector(v) 에 통나무 저장 2. 초기 left(ll)은 0이고, right(rr)은 max로 초기화 3. left(ll) 와 right(rr) 의 중간 값(mid)을 두고 통나무를 mid기준으로 잘라 sum 에 저장 4. 이분탐색으로 sum과 통나무 길이 M과 비교함 5. M이 더 크다면 더 작은 값을 탐색하고, M이 작다면 더 큰 결과 값을 탐색 Problem 문제 상근이는 나무 M미터가 필요하다. 근처에 나무를 구입할 곳이 모두 망해버렸기 때문에, 정부에 벌목 허가를 요청했다. 정부는 상근이네 집 근처의 나무 한 줄에 대한 벌목 허가를 내주었고, 상근이는 새로 구입한 목재절단기를 이용해서 나무를 구할.. 2020. 8. 24.
728x90
반응형