#include <stdio.h>
#include <iostream>
#include <cmath>
#include <cstring>
using namespace std;
int main(){
int n;
while(cin>>n)
{
int x,f,z;
f=n/2;
x=n-f;
z=f*(f-1)/2+x*(x-1)/2;
cout<<z<<endl;
}
return 0;
}
对于圆环来说,最好的办法就是对半分。
关于排序问题,就是1,2,3,4,5,6,->6,5,4,3,2,1即可,所以就是6冒泡上去,1冒泡下来。
圆环就是两段分别这么做,然后相加就好。
所以就1A。