Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to find the maximum Product in Square Matrix by java

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

This article mainly shows you "java how to find the maximum product of the square matrix", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "java how to find the maximum product of the square matrix" this article.

In the following 20 × 20 square array, four numbers arranged diagonally are marked red.

The product of these four numbers is 26 × 63 × 78 × 14 = 1788696.

In this 20 × 20 square matrix, what is the maximum product of four adjacent numbers in the same direction (bottom to top, top to bottom, right to left, left to right, or diagonal)?

System.out.println (Summation_primes (2000000))

Analysis:

Add primes less than 2000000 through a loop.

The above is all the content of the article "how to find the maximum product of java matrix". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Product square matrix maximum content article diagonal diagonal learning help number direction easy to understand more organization knowledge prime ribbon industry information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Linux Docker Microsoft macOS