제출 #722892

#제출 시각아이디문제언어결과실행 시간메모리
722892dxz05Boarding Passes (BOI22_passes)C++17
5 / 100
1 ms596 KiB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
#define all(x) (x).begin(), (x).end()
#define MP make_pair
const int N = 100500;

void solve(){
    string s;
    cin >> s;
    int n = (int)s.size();

    int x = n / 2, y = (n + 1) / 2;

    long double a = (long double) x * (x - 1) / 4;
    long double b = (long double) y * (y - 1) / 4;

    cout << fixed << setprecision(6);
    cout << a + b << endl;

}

int main() {
    ios_base::sync_with_stdio(false);

#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    solve();

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...