OJ-Problems-Source/HDOJ/1214_autoAC.cpp

13 lines
184 B
C++
Raw Normal View History

2016-08-13 17:16:08 +08:00
#include<stdio.h>
int main()
{
int n,a;
while(~scanf("%d",&n))
{
a=n/2;
n-=a;
printf("%d\n",a*(a-1)/2+n*(n-1)/2);
}
return 0;
}