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 <iostream>
#include <string>
using namespace std;
typedef long long ll;
int main() {
string a;
cin >> a;
ll size = a.length();
if (size % 2 == 0)
cout << (size / 2 * (size / 2 - 1)) / 2;
else
{
cout << (size / 2 * (size / 2 - 1)) / 4 + ((size / 2 + 1) * (size / 2)) / 4;
}
}
# | 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... |