INFOSYS | HackWithInfy Problem

Revision en1, by xhumblef00lx, 2025-07-12 21:52:56

You have an array A containing N elements. Suppose you select M elements from the array , then the current beauty of the array will be sum of those M elements. Every second, the beauty of the array increases by the value M. what is the minimum amount of time, the beauty of array equals the value X. N <= 100, A[i] <= 1e5 and X <= 1e9. How do i approach this problem?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English xhumblef00lx 2025-07-12 21:52:56 400 Initial revision (published)