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;
string s(899, 'A');
double f(int len) {
return 1.00*(len/2)*(len/2-1)/2;
}
int main() {
cin >> s;
cout << fixed << setprecision(3);
if(s.size() & 1) {
cout << (f(s.size()-1) + f(s.size()+1))/2.00;
} else {
cout << f(s.size());
}
}
# | 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... |