http://www.spoj.com/problems/WPC5A/
we know if 'x' is odd and x^2+y^2=z^2 then x^2=(y+z)(y-z) so (y-z) must be the smallest factors of x^2.
Therefore this problem is all about finding the number of factors of size of a side and then printing the value of count_factor(n)/2.........simple problem just do it..
we know if 'x' is odd and x^2+y^2=z^2 then x^2=(y+z)(y-z) so (y-z) must be the smallest factors of x^2.
Therefore this problem is all about finding the number of factors of size of a side and then printing the value of count_factor(n)/2.........simple problem just do it..
No comments:
Post a Comment