import java.util.Scanner;
//11547
public class AutomaticAnswer {
static int testCases;
static String number = "";
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
testCases = scanner.nextInt();
while((testCases--) != 0) {
number = Integer.toString((scanner.nextInt() * 315 + 36962)/10);
System.out.println(number.charAt(number.length() - 1));
}
scanner.close();
}
}
10/08/2013
11547 - Automatic Answer - Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment