先暴力把1~20的结果打出来...观察..发现都是两个互质的数乘积...那么就从x/2开始找互质的数...10^9也可以秒出....不知道如何证明..


Program:

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<algorithm>
#define ll long long
#define oo 1000000007
#define pi acos(-1.0)
#define MAXN 100005
using namespace std;
ll gcd(ll a,ll b)
{
while (b)
{
ll k=a;
a=b,b=k%b;
}
return a;
}
int main()
{
ll t,x,p;
scanf("%I64d",&t);
while (t--)
{
scanf("%I64d",&x);
p=x/2;
while (gcd(p,x-p)!=1) p--;
printf("%I64d\n",p*(x-p));
}
return 0;
}