This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
int n;
cin>>n;
int k=n/2;
double res=((double)(k-1)*k)/2;
//cout<<res<<'\n';
if (n%2==0) cout<<res;
else cout<<res+((double)((n+1)/2-1))/2;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |