#include<iostream>
using namespace std;
int main() {
string s; cin >> s;
int n = s.size();
double r = 0;
double x = n / 2;
r += x * (x - 1);
x = (n + 1)/2;
r += x * (x - 1);
r *= 0.25;
cout << r << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
1st numbers differ - expected: '100800.5000000000', found: '100800.0000000000', error = '0.0000049603' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
1st numbers differ - expected: '100800.5000000000', found: '100800.0000000000', error = '0.0000049603' |
2 |
Halted |
0 ms |
0 KB |
- |