...

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);
            }
        }
    }
}
posted @ 2023-10-26 17:21  浊酒123  阅读(17)  评论(0)    收藏  举报