IT Contents/프로그래밍 팁
Number of trailing zeros of N!, CodeWars Kata 자바 솔루션
Number of trailing zeros of N!, CodeWars Kata Write a program that will calculate the number of trailing zeros in a factorial of a given number. N! = 1 * 2 * 3 * ... * N Be careful 1000! has 2568 digits... For more info, see: http://mathworld.wolfram.com/Factorial.html Examples zeros(6) = 1 # 6! = 1 * 2 * 3 * 4 * 5 * 6 = 720 --> 1 trailing zero zeros(12) = 2 # 12! = 479001600 --> 2 trailing zero..
2021. 4. 6. 07:00
최근댓글