This is a easy and good puzzle.
Find the 8 digit number which satisfies all of the following conditions
1-> the first 2 and last 2 digits are same.
2-> the total of 8 digit is 37.
3-> it is a square number.
4-> it is a cube number.
If anyone wants to make the code, here is the hint:
try making a series of square & cube numbers, then save the common numbers in series. Then you know the remaining task.
Ans:
16777216.
The square root is 4096 and cube root is 256.
i followed this approach as it decreases the chances , i checked for cubes of numbers which end up in 8 digits so the range of numbers from 216 - 464 on cubing gives the answer which is of 8 digits following the same approach in squaring 3163 - 9999 gives the numbers in 8 digits.
So i wrote a loop to check the cube roots against the square roots and i didnt use the condition the first two and last two are same ..
With using that i think the solution will be even simpler ..
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment