[내일배움캠프-퍼포먼스 마케터] 본캠프 85일차

이석민·2025년 8월 7일
post-thumbnail

오늘 학습한 내용

SQL 코드카타

Query all columns (attributes) for every row in the CITY table.

The CITY table is described as follows:

작성 쿼리

SELECT *
FROM CITY

PYTHON 코드카타

문제 설명
정수 배열 numbers가 매개변수로 주어집니다. 
numbers의 원소 중 두 개를 곱해 만들 수 있는 최댓값을 
return하도록 solution 함수를 완성해주세요.

제한사항
0 ≤ numbers의 원소 ≤ 10,000
2 ≤ numbers의 길이 ≤ 100

풀이

def solution(numbers):
    numbers.sort()
    return numbers[-1] * numbers[-2]

0개의 댓글