can anybody help me on - how to find the fastest way to check if a large number is perfect square or not?
0^2 = 0 1^2 = 1 2^2 = 4 3^2 = 9 4^2 = _6 5^2 = _5 6^2 = _6 7^2 = _9 8^2 = _4 9^2 = _1 It appears, if it ends in 0, 1, 4, 5, 6, or 9, it COULD BE a perfect square. Ends with 2, 3, 7, or 8? Don't consider looking any more. It's not a perfect square. What other ways can you find that might help determine a particular value?
yes, I got this. actually, it a huge number of 20 digits. so, I needed a way to find if this is the perfect square or not. your answer solved my problem. Thanks buddy !
acually, my question was:
All the nine digits are arranged here so as to form four square numbers : 9, 81, 324, 576 how would you put them together so as to form a single smallest possible square number and a single largest possible square number?
hmm
ok not that!
but i am thinking eulers method could be 1 way
look at this http://stackoverflow.com/questions/295579/fastest-way-to-determine-if-an-integers-square-root-is-an-integer
i think just eulers formula plugged into a computer will be the fastest way to see if its a sqrt or not, as soon as it settles on a value
you just have to show its converging to a number in the end
Join our real-time social learning platform and learn together with your friends!