2017年8月15日 星期二

UVA10082:WERTYU

  1. import java.util.*;  
  2. class main{  
  3. public static void main(String[] args){  
  4. Scanner sc = new Scanner(System.in);  
  5. String Keybroad = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";  
  6. while(sc.hasNext()){  
  7. String str = sc.nextLine();  
  8. for(int i = 0;i<str.length();i++){  
  9.   for(int j = 0;j<Keybroad.length();j++){  
  10.     if(str.charAt(i)==Keybroad.charAt(j)) System.out.print(Keybroad.charAt(j-1));  
  11.     else if(str.charAt(i)==' '){ System.out.print(" ");break;}  
  12.   }  
  13. }  
  14. System.out.println();  
  15. }   
  16. }  
  17. }  

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。