import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
String s = Integer.toHexString(n);
System.out.println(Integer.toHexString(n).toUpperCase());
}
}
原文:http://www.cnblogs.com/LuckyZcy/p/5179602.html