Pythagoras-Triplet

  1. I wrote my code after seeing the hint given in the video. But still I am getting some of the test cases wrong. The method gives us fool proof values so I dont understand what am I doing wrong?
  2. what to do if the given number is a part of two triplets?

Here’s my code: https://ide.codingblocks.com/s/73241

I have another question, why does it show that the “doubt support period has ended” while I am still taking the course and the course has been extended till september??

@Ishitagambhir hey ishita the test case can be 10^9 so change your data type long long int and your code is not giving correct output for this case
1
0 1
but it should be only -1
and for the next issue i will report this to developer team.

1 Like

@jaiskid thanks for your help! My solution got accepted.

@Ishitagambhir happy coding!