• Skip to primary navigation
  • Skip to content
  • Skip to footer
Just Do IT!
  • Posts
  • Categories
  • Tags

    LeeDayday

    I am an amazing person.

    • Somewhere

    [백준 1676] 팩토리얼 0의 개수

    최대 1 분 소요

    1676번 : 팩토리얼 0의 개수

    1676: 팩토리얼 0의 개수

    방법 1

    import sys
    
    def factorial(n):
        ans = 1
        for i in range(2, n+1):
            ans *= i
        return ans
    
    n = int(sys.stdin.readline())
    
    str_n = str(factorial(n))
    
    cnt = 0
    for ch in str_n[::-1]:
        if ch == '0':
            cnt += 1
        else:
            break
    
    print(cnt)
    

    태그: baekjoon

    카테고리: algorithms

    업데이트: July 31, 2023

    공유하기

    Twitter Facebook LinkedIn
    이전 다음

    참고

    DNS 이해하기

    최대 1 분 소요

    DNS란 무엇인가?

    [Leetcode] Rising Temperature

    최대 1 분 소요

    문제 링크

    [Leetcode] Customer Who Visited but Did Not Make Any Transactions

    최대 1 분 소요

    문제 링크

    [Leetcode] Replace Emplyee ID With The Unique Identifier

    최대 1 분 소요

    문제 링크

    • 팔로우:
    • 피드
    © 2025 LeeDayday. Powered by Jekyll & Minimal Mistakes.