2021/02(17)
-
[파이썬 300제 풀기] 001~010 (파이썬 시작하기)
# 001 print 기초 print('Hello World') # 002 print 기초 print("Mary's cosmetics") # 003 print 기초 print('신씨가 소리질렀다. "도둑이야".') # 004 print 기초 print("C:\Windows") # 005 print 탭과 줄바꿈 print("안녕하세요.\n만나서\t\t반갑습니다.") # \n: 줄바꿈, \t: 탭 # 006 print 여러 데이터 출력 print ("오늘은", "일요일") # => 오늘은 일요일 # 007 print 기초 print('naver', 'kakao', 'sk', 'samsung', sep=';') # 008 print 기초 print('naver', 'kakao', 'sk', 'samsung',..
2021.02.22 -
[HackerRank MySQL] Binary Tree Nodes
Binary Tree Nodes You are given a table, BST, containing two columns: N and P, where N represents the value of a node in Binary Tree, and P is the parent of N. Write a query to find the node type of Binary Tree ordered by the value of the node. Output one of the following for each node: Root: If node is root node. Leaf: If node is leaf node. Inner: If node is neither root nor leaf node. Sample I..
2021.02.22 -
[HackerRank MySQL] Placements
Placements You are given three tables: Students, Friends and Packages. Students contains two columns: ID and Name. Friends contains two columns: ID and Friend_ID (ID of the ONLY best friend). Packages contains two columns: ID and Salary (offered salary in $ thousands per month). Write a query to output the names of those students whose best friends got offered a higher salary than them. Names mu..
2021.02.22 -
[HackerRank MySQL] Weather Observation Station 19 - POWER & SQRT (SQL에서 제곱과 제곱근 계산하기)
Weather Observation Station 19 Consider P1(a, c) and P2(b, 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. Query the Euclidean Distance between points P1 and P2 and format your answer to display 4 decimal digits. Input Format..
2021.02.15 -
[HackerRank MySQL] Top Competitors
Top Competitors 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 the hacker earned a full score. If more than one hacker received full scores i..
2021.02.15 -
[HackerRank MySQL] New Companies
New Companies Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy: Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of employees. Order your output by ascending company_code. Note: The tables ma..
2021.02.10