Leetcode Question 343 "Integer Break" in Java

Pubblicato il: 28 agosto 2022
sul canale di: Ghumman Tech
211
3

Given an integer n, break it into the sum of k positive integers, where k greater than equal to 2, and maximize the product of those integers.

Return the maximum product you can get.



Example 1:

Input: n = 2
Output: 1
Explanation: 2 = 1 + 1, 1 × 1 = 1.
Example 2:

Input: n = 10
Output: 36
Explanation: 10 = 3 + 3 + 4, 3 × 3 × 4 = 36.


In questa pagina del sito puoi guardare il video online Leetcode Question 343 "Integer Break" in Java della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Ghumman Tech 28 agosto 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 211 volte e gli è piaciuto 3 spettatori. Buona visione!