Submission #850391

# Submission time Handle Problem Language Result Execution time Memory
850391 2023-09-16T13:45:15 Z Ahmed57 Boarding Passes (BOI22_passes) C++17
0 / 100
1 ms 344 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
    string s;cin>>s;
    long long x = s.size();
    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;
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Incorrect 1 ms 344 KB Expected double, but "-nan" found
3 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 Correct 0 ms 344 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Incorrect 1 ms 344 KB Expected double, but "-nan" found
3 Halted 0 ms 0 KB -