why this code showing wrong answer? i my IDE its working fine…
#include < cstdio>
#include < iostream>
#include < cmath>
using namespace std;
#define ll long long int
int main() {
ll x;
int t;
cin >> t;
while (t)
{
cin >> x;
if (x < 3) { printf("-1\n"); continue; }
if (x & 1) printf("%lld %lld\n", (x * x - 1) / 2, (x * x + 1) / 2);
else printf("%lld %lld\n", ((x * x) / 4) - 1, ((x * x) / 4) + 1);
t--;
}
return 0;
}
why…
Editorial