Sample Input
k[r dyt I[o
Sample Output
how are you
解法: 打表對照
import java.util.*;
public class UVA10222 {
public static void main(String[] args) {
String board = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./";
Scanner sc = new Scanner(System.in);
int t;
while (sc.hasNext()) {
String word = sc.nextLine().toLowerCase();
for (int i = 0; i < word.length(); i++) {
t = board.indexOf(word.charAt(i));
if (t != -1) {
System.out.print(board.charAt(t - 2));
} else {
System.out.print(word.charAt(i));
}
}
System.out.println();
}
}
}