Generate an N | Java program for the above approach ; Function to minimize the maximum element present in an N - length array having sum of elements divisible by K ; Return the ceil value of ( K / N ) ; Driver code
class GFG { static int minimumValue ( int N , int K ) { return ( int ) Math . ceil ( ( double ) K / ( double ) N ) ; } public static void main ( String [ ] args ) { int N = 4 , K = 50 ; System . out . print ( minimumValue ( N , K ) ) ; } }