import java.util.Scanner;
public class IdAuthentication{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str;
while( sc.hasNext() ){
str = sc.nextLine();
char c[] = str.toCharArray();
int sum = 0;
for(int i = 0; i < 8; i++ ){
sum += (c[i]-48)*(8-i);
}
sum += (c[8]-48);
int n;
for(int a = 65; a <= 90; a++){
if( a == 88 || a == 89 ){
n = a - 58;
}
else if( a >= 65 && a <= 72 ){
n = a - 55;
}else if( a >= 74 && a <= 78){
n = a - 56;
}else if( a >= 80 && a <= 86){
n = a - 57;
}else{
n = (a == 73) ? 34 : (a == 79) ? 35 :
(a == 87) ? 32 : (a == 90) ? 33 : a;
}
if( (sum + (n/10) + ((n%10)*9))%10 == 0 ){
System.out.print((char)a);
}
}
System.out.println();
}
}
}
沒有留言:
張貼留言