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 double ld;
int main() {
string a;
cin >> a;
int size = a.length();
cin >> size;
ld b = size / 2;
ld c = (size + 1) / 2;
ld x = ((c * (c-1)) +(b*(b-1))) / ld(4);
cout << fixed << setprecision(6) << x;
}
# | 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... |