In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will introduce in detail for you "java how to find the maximum product of continuous numbers", the content steps are clear and detailed, and the details are handled properly, and the editor will update different knowledge points every day. I hope this article "java how to find the maximum product of continuous numbers" can give you unexpected gains, please follow the editor's ideas slowly and deeply, the specific contents are as follows, to harvest new knowledge together.
In the following 1000 positive integers, the maximum product of four consecutive numbers is
9 × 9 × 8 × 9 = 5832.
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450
Find out the 13 consecutive digits with the largest product of the 1000 positive integers. What is the product of them?
System.out.println (fist10001_prime (10001))
Analysis:
Is to determine whether it is a prime number, and then add it one by one until it is equal to 10001. The following method is to determine whether it is a prime number, 2 is the only even prime number, except for 2 if it is an even number directly return false, except 2 any prime number can not be divisible by even numbers, so the following cycle starts from 3, adding 2 each time.
What can Java be used for? Java is mainly used in: 1. Web development; 2. Android development; 3. Client development; 4. Web page development; 5. Enterprise application development; 6. Java big data development; 7. Game development and so on.
If you can read this, the editor hopes that you will have the most profound understanding of the key issue of "how to find the maximum product of continuous numbers" from the practical level, and you need to practice and use it yourself to understand it. If you want to read more related articles, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.