Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the highly reducible number of triangles by java

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces java how to achieve a highly reducible number of triangles, the article introduces in great detail, has a certain reference value, interested friends must read it!

Triangular sequences are generated by adding natural numbers one by one. For example, the number of the seventh triangle is 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten items of the triangle series are:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55,...

Let's list all the divisors of the first seven triangles:

1: 1

3: 1,3

6: 1,2,3,6

10: 1,2,5,10

15: 1,3,5,15

21: 1,3,7,21

28: 1,2,4,7,14,28

We can see that 28 is the first triangle with more than five divisors.

What is the number of the first triangle with more than 500 divisors?

System.out.println (Largest_product_grid (4))

Analysis:

Judge the upper and lower left and right respectively to find the maximum value. But to meet the conditions, such as horizontal and vertical 4 can not change lines, oblique to meet at least 4.

These are all the contents of the article "how to achieve highly reducible triangles in java". Thank you for reading! Hope to share the content to help you, more related knowledge, 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report