Friday, 31 March 2023

Make Array Elements Equal

 #User function Template for python3


class Solution:

    def minOperations(self, N):

        # Code here

        if N == 1:

            return 0


        return N * N // 4


#{ 

 # Driver Code Starts

#Initial Template for Python 3


if __name__ == '__main__':


    T = int(input())

    while T > 0: 

        N =int(input())

        ob = Solution()

        print(ob.minOperations(N))


        T -= 1


No comments:

Post a Comment

GeeksforGeeks and LeetCode - Problem Of The Day

Welcome to our Problem of the Day Solutions page, where we provide comprehensive solutions to daily programming challenges from two renowned...