AtCoder Beginner Contest 266 問題A-G 解説
A - Middle Letter
奇数長の文字列が与えられるので、その中央の文字を出力します。
#include <iostream>
#include <string>
#include <vector>
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
std::string input_str;
std::cin >> input_str;
// 0-indexedなので、長さLの文字列の中央は L/2
...
9月13日 12:05 投稿