Submission #1098870

#TimeUsernameProblemLanguageResultExecution timeMemory
1098870not_amirBoarding Passes (BOI22_passes)C++14
5 / 100
1 ms756 KiB
#include <bits/stdc++.h>
using namespace std;

typedef long double ld;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin >> s;
    int n = s.length();
    ld n1 = n / 2, n2 = (n + 1) / 2;
    ld ans = (n1 * (n1 - 1) + n2 * (n2 -1)) / 4.0;
    cout << fixed << setprecision(6) <<  ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...