본문 바로가기

study gomi

검색하기
study gomi
프로필사진 공부하곰

  • 분류 전체보기 (111)
    • basic (55)
      • java (16)
      • kotlin (5)
      • python (31)
      • c (3)
    • Practice (37)
      • Algorithm (4)
      • Baekjoon (22)
      • Programmers (9)
      • Other Sites... (2)
    • App (12)
      • Android (12)
    • Else (6)
      • Spam (0)
      • Free Board (1)
      • my Tistory blog (1)
Guestbook
반응형
Notice
Recent Posts
Recent Comments
Link
  • Baekjoon Online Judge
250x250
«   2025/05   »
일 월 화 수 목 금 토
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
  • Kotlin
  • Java
  • filternotnull()
  • Dependency
  • 문자열
  • programmers
  • nullpointerexception방지
  • compose
  • 리스트
  • 파이썬
  • 자료형
  • Provider
  • 티스토리챌린지
  • 오블완
  • 백준파이썬
  • disposableeffect
  • 파이썬문법
  • Hilt
  • jetpack
  • 자바리스트정렬
  • ContentProvider
  • android
  • 자바set
  • 자바
  • list
  • 프로그래머스
  • 배열
  • Python
  • composelifecycle
  • 백준
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록백준집합 (1)

study gomi

[백준/baekjoon] 2501번 약수 구하기 python(파이썬)

내 제출 - set를 사용했다. # 자연수 n과 k가 주어짐 n, k = map(int, input().split()) division_set = set() # n의 약수들 중 for i in range(1, n//2 + 1): if n % i == 0: division_set.add(i) division_set.add(n//i) division_list = sorted(list(division_set)) if len(division_list) < k: print(0) else: print(division_list[k-1]) 실행 결과 채점 결과

Practice/Baekjoon 2024. 1. 2. 12:53
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바