| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- 파이썬머신러닝완벽가이드
- 10953
- 2015 봄학기 알고리즘
- Numpy
- matrixElementsSum
- adjacentElementsProduct
- centuryFromYear
- 2750
- 백준
- Python
- flask
- recursion
- Counting cells in a blob
- Daily Commit
- 피보나치 수
- baekjun
- shapeArea
- codesingal
- til
- data_structure
- cpp
- C++
- Sequential Search
- markdown
- codesignal
- collections.deque
- almostIncreasingSequence
- All Longest Strings
- 수 정렬하기
- 파이썬 포렌식
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