My 2 test cases are not passing. Can you pls check whats wrong in the code.
Link to the code: https://ide.codingblocks.com/s/214976
Pythagoras Triplet
@anugrahrastogi
The range of variables is smaller than required
N can be 10^9,
You need a datatype of larger range than int for storing c.
Modification:
long
The change worked. But why is it so? The size of int is 2^31 - 1 which is more than 10^9.
Okay got it. Thanks a lot!!