...
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
while(input.hasNext()) {
String start=input.nextLine();
if(start.equals("ENDOFINPUT")) {
break;
}
else {
String s =input.nextLine(),t="";
String end=input.nextLine();
for(int i=0;i<s.length();i++) {
if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
t =t+(char)((s.charAt(i)-'A'+21)%26+'A');
}
else
t =t+s.charAt(i);
}
System.out.println(t);
}
}
}
}

浙公网安备 33010602011771号