찬스의 블로그

Version 3.0


  • 홈

  • 소개

  • 아카이브

  • 카테고리

  • 태그

  • 검색

[Python] BOJ 1912번. 연속합

작성일 2020-06-10 | In Algorithm |

1912번. 연속합

문제 링크

  • https://www.acmicpc.net/problem/1912

풀이 코드

1
2
3
4
5
6
7
8
9
10
# 1912번. 연속합


n = int(input())
nList = list(map(int, input().split()))

sum = [nList[0]]
for i in range(n-1):
    sum.append(max(sum[i]+nList[i+1], nList[i+1]))
print(max(sum))

비고

# 알고리즘 # 백준 # 파이썬
[Python] BOJ 1490번. 자리수로 나누기
[Python] BOJ 1427번. 소트인사이트
  • 목차
  • 블로그 정보
찬스

찬스

329 포스트
15 카테고리
37 태그
  1. 1 1912번. 연속합
    1. 1.1 문제 링크
    2. 1.2 풀이 코드
    3. 1.3 비고
© 2022 찬스
Powered by Jekyll
Theme - NexT.Muse