Submission #582532

#TimeUsernameProblemLanguageResultExecution timeMemory
582532silv723Boarding Passes (BOI22_passes)C++17
0 / 100
0 ms212 KiB
#include<bits/stdc++.h> using namespace std; using ll=long long; ll f(ll n){ if(n%2) return ((n-1)/2)*((n-1)/2); else return n/2*(n/2-1); } int main(){ string s; cin>>s; ll n=s.size(); double ans=0; for(ll i=3;i<=n;i++){ ans+=(double)f(i)/(double)i; } cout<<setprecision(20)<<ans<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...