Official

A - Rotate Editorial by en_translator


If you are new to learning programming and do not know where to start, please try Problem A “Welcome to AtCoder” from practice contest. There you can find a sample code for each language.


For example, one can output the second, third, and first character of \(s\), in this order.
In many language, when obtaining the \(i\)-th character of a string, the first one is counted as the \(0\)-th.
Sample Code (C++)

#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	std::string s;
	std::cin >> s;
	std::cout << s[1] << s[2] << s[0] << std::endl;
	return 0;
}

posted:
last update: