NA96%但不知道錯在哪裡
package javaapplication2;
import java.util.Scanner;
public class JavaApplication2 {
public static void main(String[] args) {
int back;
int total = 0;
Scanner sc = new Scanner(System.in);
String place1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int[] place2 = {10,11,12,13,14,15,16,17,34,18,19,20,21,22,35,23,24,25,26,27,28,29,32,30,31,32};
String a = sc.next();
for(int i=0; i<26; i++){
if(a.charAt(0) == place1.charAt(i)){
back = place2[i];
total = back/10 + back%10*9;
}
}
int num_place = 1;
for(int j=8; j>=0; j--){
int num = (int) a.charAt(num_place);
if(j==0){
total+=(num-48);
}
else{
total += (num-48)*j;
num_place++;
}
}
int ans = total%10;
if(ans==0){
System.out.println( "real");
}
else{
System.out.println("fake");
}
}
}