a009: 解碼器
題目:http://zerojudge.tw/ShowProblem?problemid=a009
程式碼:
程式碼:
package a009;
import java.util.Scanner;
public class a009 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
String s = sc.nextLine();
char [] a = s.toCharArray();//將這個執行個體中的字元複製到 Unicode 字元陣列中。
for(int i=0;i<a.length;i++){
int t =(int)a[i];
t = t-7;
char str = (char) t;
System.out.print(str);
}
System.out.println();
}
}
}

留言
張貼留言