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 <iomanip>
using namespace std;
int main(){
int n;
string s;
cin>>s;
n=s.size();
double S=(n/2)*(n/2-1)+((n+1)/2)*((n+1)/2-1);
cout<<setprecision(12)<<fixed;
cout<<S/4.0<<endl;
}
# | 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... |