#17810: 請問java高手 用這樣配對可以嗎?但結果跑不出來


a43913072@gmail.com (陳芃)

學校 : 國立暨南國際大學
編號 : 86383
來源 : [219.68.215.178]
最後登入時間 :
2019-06-25 20:44:12
a020. 身分證檢驗 | From: [163.22.18.105] | 發表日期 : 2019-05-22 21:06

public class a020{
public static void main(String[] args) {
java.util.Scanner scanner = new java.util.Scanner(System.in);
String[] en= {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
int[] ma= {10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33};
String[] in=new String[10];
int ten,zero,all=0;
for(int i=0;i<10;i++) {
in[i]=scanner.next();
for(int j=0;j<25;j++) {
if(in[0]==en[j]) {
ten=ma[j]/10;
zero=ma[j]%10;
all=ten+zero*9;
System.out.print(all);
}
}
}
}
}

 
ZeroJudge Forum