# 不如来21玩一局？

``5 6 7``

``````17
``````

``````/*#include<iostream>
#include<cmath>
using namespace std;

int Gcd(int n,int m)
{
int x=n%m;
while(x!=0)
{
n=m;
m=x;
x=n%m;
}
return m;
}

int main()
{
int a,b,c;
cin>>a>>b>>c;
int ans;
ans=(c*a)/2;
int l1,l2,l3;
l1=Gcd(a,b);
l2=Gcd(a,fabs(b-c));
cout<<ans-(l1+l2)/2+1<<endl;
}*/
#include<cstdio>//s=l/2+n-1;
#include<cmath>
#include<cstdlib>
int a,b,c,d,e,f;
int area()
{
return abs((a*d+c*f+b*e-a*f-b*c-d*e)/2);
}
int gcd(int x,int y)
{
if(y==0)
return x;
else
return gcd(y,x%y);
}
int main ()
{
int k=0;
scanf("%d%d%d",&c,&d,&e);
a=b=f=0;
int s=area();
int l1=gcd(abs(a-c),abs(b-d));
int l2=gcd(abs(a-e),abs(b-f));
int l3=gcd(abs(c-e),abs(d-f));
printf("%d\n",s-(l1+l2+l3)/2+1);
return 0;
}
``````

``````#include <iostream>
using namespace std;
int main()
{
float a,b,c,x1,x2;
int i,j,n=0,x3,x4;
cin>>a>>b>>c;
for(i=1;i<b;i++)
{
x1=i*(a/b);
x2=((a-c)/b)*i+c;
x3=int(x1);
x4=int(x2);
if(x4==x2)
n=n+x4-x3-1;
else
n=n+x4-x3;
}
cout<<n<<endl;
return 0;
}   ``````