2009-05-23 19:03:38來源不明

ACM 11296 11296 - Counting Solutions to an Integral Equation

想法:先帶x再帶y z就理所當然的出來,藉此導出公式

/**********************************************************/

#include<stdio.h>
#include<stdlib.h>
main()
{
 long long int n;
 while(scanf("%lld",&n)==1)
  {
    if(n%2!=0) n--;
    printf("%lld\n",(n/2+2)*(n/2+1)/2);
  }
 return 0;
}