当前位置:网站首页>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;
}
边栏推荐
- [combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
- Circular queue related design and implementation reference 1
- Leetcode 300 longest ascending subsequence
- CV learning notes alexnet
- Application of external interrupts
- Leetcode bit operation
- Leetcode-100: same tree
- The 4G module designed by the charging pile obtains NTP time through mqtt based on 4G network
- 20220603数学:Pow(x,n)
- The data read by pandas is saved to the MySQL database
猜你喜欢

2021-10-28

Leetcode-513:找树的左下角值

Development of intelligent charging pile (I): overview of the overall design of the system

LeetCode - 895 最大频率栈(设计- 哈希表+优先队列 哈希表 + 栈) *

Leetcode - 1670 conception de la file d'attente avant, moyenne et arrière (conception - deux files d'attente à double extrémité)

03 fastjason solves circular references

Mise en œuvre d'OpenCV + dlib pour changer le visage de Mona Lisa

LeetCode - 933 最近的请求次数
![[combinatorics] Introduction to Combinatorics (combinatorial idea 3: upper and lower bound approximation | upper and lower bound approximation example Remsey number)](/img/19/5dc152b3fadeb56de50768561ad659.jpg)
[combinatorics] Introduction to Combinatorics (combinatorial idea 3: upper and lower bound approximation | upper and lower bound approximation example Remsey number)

Leetcode - 1670 design front, middle and rear queues (Design - two double ended queues)
随机推荐
LeetCode - 5 最长回文子串
openEuler kernel 技术分享 - 第1期 - kdump 基本原理、使用及案例介绍
El table X-axis direction (horizontal) scroll bar slides to the right by default
20220601数学:阶乘后的零
2021-10-27
LeetCode - 703 数据流中的第 K 大元素(设计 - 优先队列)
STM32 running lantern experiment - library function version
yocto 技术分享第四期:自定义增加软件包支持
Swing transformer details-1
getopt_ Typical use of long function
CV learning notes - scale invariant feature transformation (SIFT)
Positive and negative sample division and architecture understanding in image classification and target detection
Installation and removal of MySQL under Windows
2.2 DP: Value Iteration & Gambler‘s Problem
2312. Selling wood blocks | things about the interviewer and crazy Zhang San (leetcode, with mind map + all solutions)
[combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
4.1 Temporal Differential of one step
Design of charging pile mqtt transplantation based on 4G EC20 module
Opencv feature extraction - hog
Anaconda安装包 报错packagesNotFoundError: The following packages are not available from current channels: