Given two numbers a and b and the task is to check whether the concatenation of a and b is a perfect square or not.
Input: a = 1, b = 21
121 = 11 × 11, is a perfect square.
Input: a = 100, b = 100
100100 is not a perfect square.
Approach: Initialize the number as strings initially and concatenate them. Convert the string to a number using Integer.valueOf() function. Once the string has been converted to a number, check if the number is a perfect square or not.
Below is the implementation of the above approach.
- Check if number formed by joining two Numbers is Perfect Cube
- Check whether the number can be made perfect square after adding K
- Previous perfect square and cube number smaller than number N
- Find the Next perfect square greater than a given number
- Least number to be added to or subtracted from N to make it a Perfect Square
- Probability of getting a perfect square when a random number is chosen in a given range
- Perfect Square String
- Closest perfect square and its distance
- Construct an Array such that cube sum of all element is a perfect square
- Construct an Array of size N whose sum of cube of all elements is a perfect square
- Find the area of the shaded region formed by the intersection of four semicircles in a square
- Sum of all perfect numbers present in an array
- Print N numbers such that their product is a Perfect Cube
- Check if a right-angled triangle can be formed by the given coordinates
- Count of decreasing pairs formed from numbers 1 to N
- Find smallest number formed by inverting digits of given number N
- Check whether a Matrix is a Latin Square or not
- Almost Perfect Number
- Even Perfect Number
- Difference between sum of the squares of first n natural numbers and square of sum
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.