#include <bits/stdc++.h>
using namespace std;
int main(){
string s;cin>>s;
long long x = s.size();
if(x<=2)cout<<0<<endl;
else if(x==3)cout<<0.5<<endl;
long double v1 = x/2 , v2 = x-v1;
long double ans = ((v1*(v1-1)/2)*(v1*(v1-1)/2))/(v1*(v1-1));
swap(v1,v2);
ans+= ((v1*(v1-1)/2)*(v1*(v1-1)/2))/(v1*(v1-1));
cout<<setprecision(3)<<fixed<<ans<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
found '100800.5000000000', expected '100800.5000000000', error '0.0000000000' |
2 |
Incorrect |
0 ms |
344 KB |
Extra information in the output file |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
found '100800.5000000000', expected '100800.5000000000', error '0.0000000000' |
2 |
Incorrect |
0 ms |
344 KB |
Extra information in the output file |
3 |
Halted |
0 ms |
0 KB |
- |