Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the problem of cutting rope by Java

Shulou Source: shulou.com Published: 2022-05-31 14:11:02 10月03日 Update

This article introduces the relevant knowledge of "how to solve the rope cutting problem with Java". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The problem of cutting rope

Title:

To give you a rope of length n, please cut the rope into m segments (m, n are all integers, n > 1 and m > 1), and the length of each rope is recorded as k [0], k [1],. K [m].

What is the possible maximum flight of k [0] * k [1] *. K [m]?

For example, when the length of the rope is 8, we cut it into three segments of length 2, 3 and 3, respectively, and the maximum product is 18.

Int maxProductAfterCutting (int length) {if (length)

Tags: Rope length maximum maximum problem finding opportunity product content more knowledge different practical successful and then that is dilemma place reality situation. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Tech Info Redmi Huawei MariaDB