import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { //方法一: public static int hexToInt1(String s) { return Integer.parseInt(s, 16); } //方法二: public static int hexToInt2(String s) { s = s.toUpperCase(); int res = 0; for(char ch : s.toCharArray()) { int digit = 0; if(ch ...