본문 바로가기

728x90
728x90

Language

[Softeer][python] 지도 자동 구축 - 컴도리돌이 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai 풀이 과정 1. 규칙성을 찾는다. 4 - > 9 - > 25 -> 81 4 -> ((2 * √4) -1)^2 -> ((2 * √9) -1)^2 -> .... 풀이 코드 start = 4 for _ in range(int(input())) : start = int(((start ** (0.5)) * 2 - 1 ) ** 2) print(start) 더보기
[Python][백준 23843][우선순위 큐,정렬] 콘센트 - 컴도리돌이 23843번: 콘센트 광재는 전자기기 대여사업을 시작했다. 퇴근하기 전에 다음날 손님들에게 빌려줄 N개의 전자기기를 충전하려 한다. 사용 가능한 콘센트는 M개가 있고, 성능은 모두 동일하다. 전자기기들은 한 www.acmicpc.net 풀이 과정 1. 입력받은 충전 시간 배열을 내림차순 정렬을 시킨다. 2. 콘센트 배열을 생성시킨다. 3. 내림차순 정렬된 충전 시간을 콘센트 배열에 삽입한다. 3-1 ) 만약 콘센트 배열의 크기가 주어진 콘센트 개수(m) 보다 작을 경우 -> 콘센트 배열에 해당 time을 삽입 3-2 ) 만약 콘센트 배열의 크기가 주어진 콘센트 개수(m) 이상일 경우 -> 가장 작은 값 + 현재 time을 더해서 다시 삽입 4. 콘센트 배열에 있는 값 중 가장 큰 값을 출력한다. -> 가.. 더보기
[HackerRank][SQL][JOIN] Basic Join, Top Competitors - 컴도리돌이 Top Competitors | HackerRank Query a list of top-scoring hackers. www.hackerrank.com Problem Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of hackers who achieved full scores for more than one challenge. Order your output in descending order by the total number of challenges in which t.. 더보기
[HackerRank][SQL][JOIN] The Report - 컴도리돌이 The Report | HackerRank Write a query to generate a report containing three columns: Name, Grade and Mark. www.hackerrank.com Problem Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades are entered first. I.. 더보기
[HackerRank][SQL][JOIN] Average Population of Each Continent - 컴도리돌이 Average Population of Each Continent | HackerRank Query the names of all continents and their respective city populations, rounded down to the nearest integer. www.hackerrank.com Problem Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest integer. Note: CITY.Countr.. 더보기
[HackerRank][SQL][JOIN] African Cities- 컴도리돌이 African Cities | HackerRank Query the names of all cities on the continent 'Africa'. www.hackerrank.com Problem Given the CITY and COUNTRY tables, query the names of all cities where the CONTINENT is 'Africa'. Note: CITY.CountryCode and COUNTRY.Code are matching key columns. -> 아프리카 대륙에 있는 모든 도시의 이름을 출력하시오. Answer select a.name from city a inner join country b on a.countrycode = b.code where b.c.. 더보기
[HackerRank][SQL][Aggregation] Weather Observation Station 21 - 컴도리돌이 Weather Observation Station 20 | HackerRank Query the median of Northern Latitudes in STATION and round to 4 decimal places. www.hackerrank.com Problem A median is defined as a number separating the higher half of a data set from the lower half. Query the median of the Northern Latitudes (LAT_N) from STATION and round your answer to 4 decimal places. -> lat_n의 중간 값을 반올림 해서 소수점 4번째 자리까지 출력하시오. SQ.. 더보기
[HackerRank][SQL][Aggregation] Weather Observation Station 19 - 컴도리돌이 Weather Observation Station 19 | HackerRank Query the Euclidean Distance between two points and round to 4 decimal digits. www.hackerrank.com Problem Consider P1(a,b) and P2(c,d) to be two points on a 2D plane where (a,b) are the respective minimum and maximum values of Northern Latitude (LAT_N) and (c,d) are the respective minimum and maximum values of Western Longitude (LONG_W) in STATION. Que.. 더보기