I had difficulty solving the following problem

Revision en1, by MonsieurV, 2019-08-27 18:46:05

for real numbers N(n<=2000), Find the longest real number array a[1], a[2], ..., a[m] such that the sum and product of that real number array is equal to N: a[1]+a[2]+...+a[m]=a[1].a[2]. ... . a[m] = N

here my code: http://ideone.com/2CsXul but it WA if n>=100

Sorry this is my first time writing blog

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English MonsieurV 2019-08-27 18:46:05 378 Initial revision (published)