The gmp_perfect_square() is an inbuilt function in PHP which checks if the given GMP number(GNU Multiple Precision: For large numbers) is a perfect square or not....
Check if a given number N is a perfect square or not. If yes then return the number of which it is a perfect square, Else print -1....
Given an array arr[] and an integer x, the task is to check whether the sum of all the perfect squares from the array is divisible by x or not. If divisible then print Yes else print No....
Given the size of array N, the task is to construct an array of size N with positive integer elements such that the cube sum of all elements of this array is a perfect square.Note: Repetitions of integers are allowed.Example:...
Check whether a number is a perfect square or not without finding its square root....
Given a number N, the task is to find the number of quadruples such that a2 + b2 = c2 + d2 where (1 <= a, b, c, d <= N)....
Given an integer N, the task is to generate a matrix of dimensions N x N using positive integers from the range [1, N] such that the sum of the secondary diagonal is a perfect square....
Given an array arr[] consisting of N positive integers, the task is to check if the product of elements of every subsequence of the given array arr[] is a perfect square or not. If found to be true, then print Yes. Otherwise, print No....
Given two numbers N and K, the task is to check whether the given number N can be made a perfect square after adding K to it.Examples:...
Given an array arr[] of size N and an array range[], the task is to check if the sum of the subarray {range[0], .. , range[1]} is a perfect square or not. If the sum is a perfect square, then print the square root of the sum. Otherwise, print -1....
Given a number N, the task is to find the sum of all the perfect square divisors of numbers from 1 to N. Examples:...
Given a number N. The task is to count total numbers under N which are both perfect square and cube of some integers.Examples:...