Submission #582531

# Submission time Handle Problem Language Result Execution time Memory
582531 2022-06-24T04:01:48 Z silv723 Boarding Passes (BOI22_passes) C++17
0 / 100
1 ms 212 KB
#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<<ans<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -