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 |
Tags
- memory
- 분할메모리할당
- codeup
- C++
- OS
- 파이썬
- 토이프로젝트
- js to ts
- 스프링
- 코드업
- error
- 타입스크립트
- react-redux
- 기초100제
- 일상
- 알고리즘
- 자료구조
- Redux
- CPU 스케줄링
- web
- react
- 정렬
- 공부
- 프로그래머스
- Java
- Spring
- Operating System
- 리덕스장바구니
- 백준
- 협업
Archives
- Today
- Total
목록1676 (1)
감자튀김 공장🍟
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/n1H52/btrUvU5Aphc/mb5JquwCc4yKNuRqJCbolk/img.png)
✔ 문제 ✔ 풀이 😲 Recursion Error 코드 import sys input = sys.stdin.readline def factorial(x): if x == 1: return x return x * factorial(x-1) n = int(input()) fac = list(map(int, str(factorial(n)))) res = 0 for i in range(len(fac) - 1, -1, -1): if fac[i] == 0: res += 1 else: break print(res) 재귀가 깊어질 때 나는 오류이다 👻 정답 코드 import sys input = sys.stdin.readline def factorial(x): ans = 1 for i in range(1, x+1): ..
Algorithm/BOJ
2022. 12. 24. 11:14