Java 代码
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
String s = cin.nextLine();
char[] sc = s.toCharArray();
for (int i = 0; i < sc.length; i ++)
{
if (i == sc.length - 1)
sc [i] = (char)((int)s.charAt(i) + (int)s.charAt(0));
else
sc [i] = (char)((int)s.charAt(i) + (int)s.charAt(i + 1));
}
System.out.println (String.valueOf(sc));
}
}