Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize the factorial of digits by java

Shulou Source: shulou.com Published: 2022-06-01 01:03:37 10月06日 Update

This article mainly shows you how java realizes the factorial of your numbers. The content is easy to understand and clear. I hope it can help you solve your doubts. Let me take you to study and learn this article "how to realize the factorial of your numbers by java".

145 is an interesting number because 1! + 4! + 5! = 1 + 24 + 120 = 145.

Find out the sum of the factorials of all the numbers equal to their own numbers, and find their sum.

Note: because 1! = 1 and 2! = 2 are not in the form of sum, they are outside the scope of discussion.

System.out.println (digitCancellingFractions ())

Analysis:

By removing the numbers on the left or right and dividing them about, see if they are equal. Then multiply all the numerators that meet the conditions, multiply the denominator separately, and then divide them into approximate fractions. Gcd means to find the greatest common divisor.

What are the commonly used java frameworks? 1. Spring Web Web MVC is a Java-based lightweight Web framework that implements the request-driven type of Spring design pattern. 2. Shirojia Apache Shiro is a security framework for Java. 3. Mybatistion MyBatis is an excellent persistence layer framework that supports normal SQL queries, stored procedures and advanced mapping. 4. DubboPol Dubbo is a distributed service framework. 5. Mavenfine Maven is a project management and build automation tool. 6. RabbitMQ _ RabbitMQ is a highly concurrent and reliable AMQP message queuing server implemented with Erlang. 7. EhcacheJournal EhCache is a pure Java in-process caching framework.

The above is about "java how to realize the factorial of numbers". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to the industry information channel.

Tags: Frames numbers factorials content articles learning help services good excellent ordinary interesting advanced common divisor numerator distributed denominator right friends is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Technology Microsoft Apple Shulou Information