일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 파이썬
- level4
- 완전탐색
- lv4
- mysql
- coding test
- 코테
- 코딩테스트
- time complexity
- sql
- 시간복잡도
- Level2
- counter
- 연습문제
- 코딩
- lambda
- Stack
- 조합
- BFS
- 데이터분석
- python
- 프로그래머스
- itertools
- programmers
- import re
- coding
- collections
- Queue
- CodingTest
- join
- Today
- Total
목록python (73)
ror_coding
[Programmers] 약수의 합 - 12928
sqrt()로 for문 연산 줄이는 코드 , List comprehension 코드 둘 다 기록하기!sqrt() 연산시 제곱 수 중복 때문에 (ex. 16 = 4x4) list에 약수를 저장 후 set() 해줘야 한다! Question 정수 n을 입력받아 n의 약수를 모두 더한 값을 리턴하는 함수, solution을 완성해주세요. Point Basic for문 : Code 1List comprehension : Code 2math.sqrt() 로 for문 연산 줄이기 : Code 3set() Code 3번 제곱의 약수 중복 방지 Code 1 : Basic def solution(n): sum=0 for i in range(1,n+1): sum += i if n%i == 0 el..
Algorithm/Python
2024. 9. 28. 15:01