あってんのに間違いとか出てんだが死ねやぼけ!!!!!!!!!!!!!!!!!!!
B012:チェックディジット
Scanner sc = new Scanner(System.in);
int linecount = Integer.parseInt(sc.nextLine());
if (linecount >= 1 && linecount <= 100) {

int[] kotae = new int[linecount];
for (int i = 0; i < linecount; i++) {
int goukei = 0;
int tmp = 0;
String line = sc.nextLine();
if (line.length() >= 1 && line.length() <= 100) {
for (int j = 0; j < 15; j++) {
tmp = Integer.parseInt(line.substring(j, j + 1));//取り出し
if (j % 2 == 0) {//偶数なら
tmp *= 2;
if (tmp >= 10) {//10以上なら
tmp = (tmp % 10) + (tmp / 10);
}

}
goukei += tmp;
}
kotae[i] = (10 - (goukei % 10));
}
}
for (int i : kotae) {
System.out.println(i);
}
}