In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to achieve java is not the sum of surplus, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
Perfect numbers are those whose sum of true factors is equal to themselves. For example, the sum of the true factors of 28 is 1 + 2 + 4 + 7 + 14 = 28, so 28 is a complete number.
A number n is called a deficiency if the sum of its true factors is less than n; otherwise, it is called a surplus.
Since 12 is the minimum surplus number, the sum of its true factor is 1 + 2 + 3 + 4 + 6 = 16, so the smallest number that can be expressed as the sum of two surplus numbers is 24. Through mathematical analysis, it can be concluded that all numbers greater than 28123 can be written as the sum of two surplus numbers; although we know that the largest number that cannot be written as the sum of two surplus numbers is less than this value, but this is the best upper bound that can be obtained through analysis.
Find out all the positive integers that cannot be written as the sum of two surplus numbers and find their sum.
System.out.println (smallestMultiple (20))
Analysis:
In fact, it is to find the minimum common multiple from 1 to 20, and the minimum common multiple from 1 to n is also a multiple of n * (nMU1). It is judged by constantly multiplying the multiple of n * (nMel 1). If 1 to n is divisible by him, it will be returned directly.
Thank you for reading this article carefully. I hope the article "how to achieve java is not the sum of numbers" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.