본문 바로가기 메뉴 바로가기

More Code

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

More Code

검색하기 폼
  • Category (105)
    • Referece (4)
    • Series (55)
    • Piece (19)
    • Ongoing (18)
      • PythonNET (3)
      • Thread (3)
      • Operator (2)
      • String (8)
      • Mutable (2)
    • Puzzle (9)
      • ProjectEuler (3)
      • HackerRank (2)
      • Exercise (4)
  • 방명록

Puzzle/HackerRank (2)
[HackerRank] The Coin Change Problem

https://www.hackerrank.com/challenges/coin-change/problem def get_ways(n, c): return [[]] if n == 0 else [[b, *j] for i, b in enumerate(c) if b = coin: for way in get_ways(change - coin, coins[i:]): my_ways.append([coin, *way]) return my_ways n = int(input("Target Change: ").strip())c = list(map(int, input("Coin List: ").strip().split()))c.sort()ways = get_ways(n, c)print("Number of Ways:", len(..

Puzzle/HackerRank 2019. 4. 19. 04:26
[HackerRank] Super Reduced String

https://www.hackerrank.com/challenges/reduced-string/problem # Python 3 def reduce_string(s): for i, x in enumerate(s[1:]): if s[i] == x: return reduce_string(s[:i] + s[i + 2:]) return s result = reduce_string(input().strip())print(result) if result != '' else print('Empty String') # Python 3 def reduce_string(s): str_list = list(s) index = 0 while len(str_list) > 1 and index < len(str_list) - 1..

Puzzle/HackerRank 2019. 4. 19. 04:25
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/08   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바