import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
char[] a={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
//int[] z={0,1,2,3,4,5,6,7,8,9,10};
//String m="10X98765432";
char[] m={'1','0','X','9','8','7','6','5','4','3','2'};
String[] f=new String[n];
int k=0,p,sum;
for(int i=1;i<=n;i++)
{
p=0;
sum=0;
String Id=sc.next();
for(int j=0;j<Id.length()-1;j++)
{
if(!(Id.charAt(j)>='0' && Id.charAt(j)<='9'))
{
p=1;
f[k]=Id;
k++;
break;
}
}
System.out.println("p="+p);
System.out.println("k="+k);
if(p!=1)
{
for(int j=0;j<Id.length()-1;j++)
{
int b=Id.charAt(j)-'0';
sum+=b*a[j];
}
sum=sum%11;
System.out.println("模="+sum);
int b=(int)Id.charAt(17)-'0';
System.out.println("b="+b);
System.out.println("m="+m[sum]);
int c=(int)m[sum]-'0';
System.out.println("c="+c);
if(c!=b);
{
f[k]=Id;
k++;
}
}
}
if(k==0)
{
System.out.println("All passed");
}
else
{
for(int i=0;i<k;i++)
{
System.out.println(f[i]);
}
}
}
}
慕粉4075985
相关分类