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 | 31 |
Tags
- 디버그심볼
- Android
- PreferenceManager
- dp
- 백준3085
- 파이썬
- 백준1476
- 백준
- 2525
- 브루트포스
- 10430
- 새싹
- debugSymbolLevel
- Counting The number
- Class Delegation
- BitMasking
- kotlin
- 25083
- 1330
- 10807
- baekjoon
- 10926
- 기본메신저
- 개수 세기
- 사파리 월드
- 코틀린
- 백준1107
- 꼬마 정민
- 18108
- safari world
Archives
- Today
- Total
목록1676 (1)
세상을 더 좋게
[백준] 1676 '팩토리얼 0의 개수' 파이썬(python)
https://www.acmicpc.net/problem/1676 1676번: 팩토리얼 0의 개수 N!에서 뒤에서부터 처음 0이 아닌 숫자가 나올 때까지 0의 개수를 구하는 프로그램을 작성하시오. www.acmicpc.net from math import factorial # 팩토리얼 함수 불러오기 n = int(input()) cnt = 0 # 0의 갯수 담을 것 for i in str(factorial(n))[::-1] : # 문자열로 바꾸고 뒤에서부터 샌다. if i != '0' : break # 0이 아니면 for문 중지 cnt += 1 print(cnt) Point 뒤에서 부터 문자열 세기
카테고리 없음
2021. 11. 10. 00:00