import java.util.Scanner;
public class work2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int num1=0 , total=0;
String input = sc.nextLine() ;
char change = '0';
char[] arr = {'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'};
for (char x : arr) {
if (x==input.charAt(0)) {
change = x;
input = input.replaceAll("[A-Z]","0");
break;
}
}
switch(change){
case 'A': num1=1+0*9;break;
case 'B': num1=1+1*9;break;
case 'C': num1=1+2*9;break;
case 'D': num1=1+3*9;break;
case 'E': num1=1+4*9;break;
case 'F': num1=1+5*9;break;
case 'G': num1=1+6*9;break;
case 'H': num1=1+7*9;break;
case 'I': num1=3+4*9;break;
case 'J': num1=1+8*9;break;
case 'K': num1=1+9*9;break;
case 'L': num1=2+0*9;break;
case 'M': num1=2+1*9;break;
case 'N': num1=2+2*9;break;
case 'O': num1=3+5*9;break;
case 'P': num1=2+3*9;break;
case 'Q': num1=2+4*9;break;
case 'R': num1=2+5*9;break;
case 'S': num1=2+6*9;break;
case 'T': num1=2+7*9;break;
case 'U': num1=2+8*9;break;
case 'V': num1=2+9*9;break;
case 'W': num1=3+2*9;break;
case 'X': num1=3+0*9;break;
case 'Y': num1=3+1*9;break;
case 'Z': num1=3+4*9;break;
}
int num2 = Integer.parseInt(input);
System.out.println(num2);
int num3=0;
total+=num2%10;
num2=num2/10;
for (int i=1 ; i<=8 ; i++) {
total+=num2%10*i;
num2=num2/10;
}
if ((total+num1)%10==0)
System.out.println("real");
else
System.out.println("fake");
}
}
}
import java.util.Scanner;
public class work2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int num1=0 , total=0;
String input = sc.nextLine() ;
char change = '0';
char[] arr = {'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'};
for (char x : arr) {
if (x==input.charAt(0)) {
change = x;
input = input.replaceAll("[A-Z]","0");
break;
}
}
switch(change){
case 'A': num1=1+0*9;break;
case 'B': num1=1+1*9;break;
case 'C': num1=1+2*9;break;
case 'D': num1=1+3*9;break;
case 'E': num1=1+4*9;break;
case 'F': num1=1+5*9;break;
case 'G': num1=1+6*9;break;
case 'H': num1=1+7*9;break;
case 'I': num1=3+4*9;break;
case 'J': num1=1+8*9;break;
case 'K': num1=1+9*9;break;
case 'L': num1=2+0*9;break;
case 'M': num1=2+1*9;break;
case 'N': num1=2+2*9;break;
case 'O': num1=3+5*9;break;
case 'P': num1=2+3*9;break;
case 'Q': num1=2+4*9;break;
case 'R': num1=2+5*9;break;
case 'S': num1=2+6*9;break;
case 'T': num1=2+7*9;break;
case 'U': num1=2+8*9;break;
case 'V': num1=2+9*9;break;
case 'W': num1=3+2*9;break;
case 'X': num1=3+0*9;break;
case 'Y': num1=3+1*9;break;
case 'Z': num1=3+4*9;break;
}
int num2 = Integer.parseInt(input);
System.out.println(num2);
int num3=0;
total+=num2%10;
num2=num2/10;
for (int i=1 ; i<=8 ; i++) {
total+=num2%10*i;
num2=num2/10;
}
if ((total+num1)%10==0)
System.out.println("real");
else
System.out.println("fake");
}
}
}
Z應該是3+3*9才對