Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 맥북
- 금융문자분석경진대회
- 캐치카페
- 프로그래머스
- leetcode
- Git
- programmers
- gs25
- 데이콘
- Real or Not? NLP with Disaster Tweets
- ubuntu
- 파이썬
- dacon
- hackerrank
- 우분투
- Kaggle
- 자연어처리
- PYTHON
- Baekjoon
- Docker
- 코로나19
- ChatGPT
- AI 경진대회
- 편스토랑
- 백준
- SW Expert Academy
- 편스토랑 우승상품
- 프로그래머스 파이썬
- github
- 더현대서울 맛집
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 2435번 : 기상청 인턴 신현수 (Python) 본문
728x90
반응형
코딩 1일 1문제! 오늘의 문제는 백준의 기상청 인턴 신현수 입니다.
👨🏻💻 코드 ( Solution )
def calculate_max_K_days_temperature(N, K, temperature_list):
K_days_temperature_list = []
for i in range(N-K + 1):
K_days_temperature = sum(temperature_list[i:i+K])
K_days_temperature_list.append(K_days_temperature)
return max(K_days_temperature_list)
if __name__ == "__main__":
N, K = map(int, input().split())
temperature_list = list(map(int, input().split()))
print(calculate_max_K_days_temperature(N, K, temperature_list))
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[BaekJoon] 2693번 : N번째 큰 수 (Python) (0) | 2022.04.24 |
---|---|
[BaekJoon] 1015번 : 수열 정렬 (Python) (0) | 2022.04.23 |
[BaekJoon] 2845번 : 파티가 끝나고 난 뒤 (Python) (0) | 2022.04.21 |
[BaekJoon] 2460번 : 지능형 기차 2 (Python) (0) | 2022.04.20 |
[BaekJoon] 11948번 : 과목선택 (Python) (0) | 2022.04.19 |
Comments