#include<bits/stdc++.h>
using namespace std;
typedef long double ld;
const int G=20;
const int N=1e5+5;
int n,g;
int main(){
cin.tie(nullptr)->sync_with_stdio(false);
string s;
cin >> s;
n=s.size();
if(n%2==0){
cout << 0.5l*(n/2)*(n/2-1);
}else{
cout << 0.5l*(1.l*(n/2)*(n/2-1)+(n/2));
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
1st numbers differ - expected: '100800.5000000000', found: '100800.0000000000', error = '0.0000049603' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
320 KB |
1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
320 KB |
1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
1st numbers differ - expected: '100800.5000000000', found: '100800.0000000000', error = '0.0000049603' |
2 |
Halted |
0 ms |
0 KB |
- |