A. Tiling with Hexagons 程序为什么交上之后是错误的,请指教
#include<stdio.h>int main()
{
int a,b,c,i;
while( scanf( "%d%d%d",&a,&b,&c ) != EOF )
{
int sum = 0;
while( a > 0 && b > 0 && c > 0 )
{
sum += ( a + b + c ) * 2 - 6;
a--;
b--;
c--;
}
if( a == b && a == c )
sum++;
printf( "%d\n",sum );
}
return 0;
}