1024! How many zeros are there at the end?

Source: Internet
Author: User

The factorial generates 0 because the number contains two or five factors. Obviously, the number of two factors must be greater than the number of five factors. Therefore, you only need to count the number of five factors.

There are several numbers that can be divisible by N from 1 to n: each time one is added to N after five, there can be a number divided by five, therefore, 1024 of the data that can be divisible by 5 is: 1024/5 = 2041024/25 = 40 // those that can be divisible by 25 contain two 5 factors, so 1024/125 = 81024/625 = 1 1 + 8 + 40 + 204 = 253

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.