分析:?解法一:
#include<iostream>
using namespace std;
int main()
{
int N;
cin >> N;
int k = N/2;
cout << N*N-k-k*(k+1) << endl;
return 0;
}
?解法二:
#include<iostream>
using namespace std;
int main()
{
int N;
cin >> N;
cout << N*N-(N/2+N*N/4) << endl;
return 0;
}