This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll ans,n;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
string s; cin>>s;
n=s.size();
if (n%2==0) ans=(n/2)*((n/2)-1);
else ans=(n/2)*(n/2);
if (ans%2==0) cout<<ans/2;
else cout<<ans/2<<".5";
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |