one of the outputs is wrong
here is cb ide link:
Pythagorean triplet output issue
formula you have use is not correct
you can see correct formula in the modified Code
use long long int instead of int
add one more condition
if(N<3)cout<<"-1";
one of the outputs is wrong
here is cb ide link:
formula you have use is not correct
you can see correct formula in the modified Code
use long long int instead of int
add one more condition
if(N<3)cout<<"-1";