//最小因数数
int max(int a, int b)
{
int t,c;
if(a<b)
{
t = a;
a = b;
a = t;
}
c = a%b;
while(c)
{
a = b;
b = c;
c = a%b;
}
return b;
}
//最小公倍数
int min(int a,int b)
{
int ma = max(a,b);
return a*b/ma;
}
//折中查找
void find(int x,int a[],int n)
{
int start = 0,end = n-1,mid;
while(start<=end)
{
mid = (start+end)/2;
if(a[mid] == x)
{
printf("%d",mid+1);
break;
}
if(a[mid] > x) start = mid+1;
if(a[mid] < x) end = mid-1;
}
}