제출 #714507

#제출 시각아이디문제언어결과실행 시간메모리
714507ibrahim001Boarding Passes (BOI22_passes)C++14
0 / 100
1 ms212 KiB
#include "bits/stdc++.h"
#define intt long long
#define pb push_back
#define endl '\n'
#define F first
#define S second
#define pii pair<int,int>
#define pll pair<intt,intt>
#define ld long double
using namespace std;
int i,j;
int main(){
    string s;
    cin >> s;
    int n = s.size();
    if ( n%2 == 0 ){
        cout << 1.0*n/4*(n/2-1) << endl;
    }
    else{
        cout << 1.0*(n-1)/4*(n-1)/2 << endl;
    }
    // ld res = 0;
    // for ( i = 1; i <= (n+1)/2; i++ )  res += 1.0*(i-1)/2;
    // for ( ; i <= n; i++ )   res += 1.0*(n-i)/2;
    // cout << res << endl;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...