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 <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <stdio.h>
using namespace std;
typedef long long ll;
int main() {
string a;
cin >> a;
int size = a.length();
if (size % 2 == 0)
cout << (size / 2 * (size / 2 - 1)) / double(2);
else
{
long double x = ((size / 2 * (size / 2 - 1)) / double(4));
long double y = ((size / 2 + 1) * (size / 2)) / double(4);
y += x;
cout << fixed << setprecision(6) << y;
}
}
# | 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... |