公式

A - ABC -> AC 解説 by en_translator


For beginners

One can find the center character of \(S\) and remove it actually.

Sample code

#include <bits/stdc++.h>
using namespace std;

int main() {
	string s;
	cin >> s;
	int n = ssize(s);
	s.erase(s.begin() + n / 2);
	cout << s << '\n';
}

投稿日時:
最終更新: