mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
13 lines
184 B
C++
13 lines
184 B
C++
#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;
|
|
}
|