题目链接:小书童——凯撒密码
java代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n;
String str;
Scanner in = new Scanner(System.in);
n = in.nextInt();
str = in.next();
for(int i=0;i<str.length();++i) {
System.out.print((char)((str.charAt(i)-'a'+n)%26+'a'));
}
}
}