250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 클라우데라자격증
- SQL
- programmers
- 클라우드컴퓨팅
- IAM
- CCAAdministrator
- 하둡
- AWSCloudPractitioner
- RDBMS
- hive
- 쉘스크립트
- CLF-01
- MFA
- 파이썬
- 데이터베이스
- CCA131
- Identity and access management
- hadoop
- 빅데이터
- SQLD
- AWS자격증
- sql자격증
- 리눅스
- mysql
- Multi Factor Authentication
- 코딩테스트
- 빅데이터실무자격증
- 클라우드자격증
- EC2
- 프로그래머스
Archives
- Today
- Total
목록리스트원소합 (1)
Sherry IT Blog

문제설명 입력으로 주어지는 리스트 x 의 첫 원소와 마지막 원소의 합을 리턴하는 함수 solution() 을 완성하세요. *내가 제출한 정답 def solution(x): answer = 0 for i in range(0,len(x)): temp = len(x)-1 if i == 0 or i == temp: answer += x[i] return answer 또는 def solution(x): answer = 0 for i in range(0,len(x)): if i == 0 or i == len(x)-1: answer += x[i] return answer 또는 def solution(x): answer = 0 for i in (0,-1): answer += x[i] return answer >> 범위..
Python/coding test_Algorithm
2021. 9. 15. 18:12