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 N;
string S;
int main() {
// Step 1. Input
cin >> S;
N = S.size();
// Step 2. Calculate
double Answer = 0.0;
for (int i = 0; i < N; i++) {
Answer += 0.5 * min(i, N - 1 - i);
}
printf("%.12lf\n", Answer);
return 0;
}
# | 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... |