import java.util.*; public class Main { public static void main(String[] args) { Scanner in =new Scanner(System.in); while(in.hasNext()) { String start =in.nextLine(); if(!start.equals("START")) { break; } StringBuffer password= new StringBuffer(in.nextLine()); String end =in.nextLine(); for(int i =0;i<password.length();i++) { if(Character.isLetter(password.charAt(i))) { int a =((int)password.charAt(i)-5); if(a<65) { a+=26; } System.out.print((char)a); }else { System.out.print(password.charAt(i)); } } System.out.println(); } } } |
Double click to view unformatted code.