当前位置:网站首页>20220601 Mathematics: zero after factorial
20220601 Mathematics: zero after factorial
2022-07-03 10:11:00 【Seeyouagain】
Title Description : Given an integer n , return n! The number of trailing zeros in the result . Tips n! = n * (n - 1) * (n - 2) * ... * 3 * 2 * 1.
coded :
public int trailingZeroes(int n) {
int result = 0;
while (n >= 5){
result += n/5;
n /= 5;
}
return result;
}
边栏推荐
- Tensorflow built-in evaluation
- Openeuler kernel technology sharing - Issue 1 - kdump basic principle, use and case introduction
- LeetCode - 5 最长回文子串
- LeetCode - 900. RLE 迭代器
- Open Euler Kernel Technology Sharing - Issue 1 - kdump Basic Principles, use and Case Introduction
- Application of 51 single chip microcomputer timer
- Leetcode-100:相同的树
- The 4G module designed by the charging pile obtains NTP time through mqtt based on 4G network
- Octave instructions
- Liquid crystal display
猜你喜欢
随机推荐
Yocto technology sharing phase IV: customize and add software package support
Connect Alibaba cloud servers in the form of key pairs
The 4G module designed by the charging pile obtains NTP time through mqtt based on 4G network
CV learning notes - edge extraction
LeetCode - 933 最近的请求次数
Opencv feature extraction - hog
When the reference is assigned to auto
Opencv note 21 frequency domain filtering
LeetCode - 706 设计哈希映射(设计) *
『快速入门electron』之实现窗口拖拽
Opencv gray histogram, histogram specification
Crash工具基本使用及实战分享
Positive and negative sample division and architecture understanding in image classification and target detection
【C 题集】of Ⅵ
Development of intelligent charging pile (I): overview of the overall design of the system
CV learning notes - feature extraction
20220531数学:快乐数
Leetcode-106:根据中后序遍历序列构造二叉树
openCV+dlib实现给蒙娜丽莎换脸
Leetcode-513:找树的左下角值









