일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- 2015 봄학기 알고리즘
- matrixElementsSum
- codesingal
- centuryFromYear
- 백준
- shapeArea
- 10953
- markdown
- data_structure
- 2750
- Python
- C++
- Daily Commit
- 파이썬머신러닝완벽가이드
- baekjun
- Sequential Search
- til
- Numpy
- Counting cells in a blob
- All Longest Strings
- codesignal
- cpp
- 피보나치 수
- adjacentElementsProduct
- collections.deque
- recursion
- flask
- almostIncreasingSequence
- 수 정렬하기
- 파이썬 포렌식
Archives
- Today
- Total
목록adjacentElementsProduct 1
Introfor
[Intro] adjacentElementsProduct
Given an array of integers, find the pair of adjacent elements that has the largest product and return that product. 주어진 정수 배열에서, 곱이 가장 큰 인접한 요소쌍을 찾아서 곱의 값을 반환한다. def adjacentElementsProduct(inputArray): return max([inputArray[i] * inputArray[i + 1] for i in range(len(inputArray) - 1)]) 각각의 인접한 요소쌍의 곱의 값들을 리스트에 저장하고, max()를 통해 최댓값을 구하여 반환한다.
Programming_prob/Codesignal
2020. 7. 18. 14:51