题解 | #缩短二进制#
缩短二进制
http://www.nowcoder.com/practice/4ffcc9f206b949ddb057ee0099b34d51
import java.util.Scanner; public class Main { public static void main(String[] args) { System.out.print("0"+Integer.toOctalString(1234)+" ");//8进制 String sixteen=Integer.toHexString(1234);//16进制 System.out.println("0X"+sixteen.toUpperCase());//需大写 } }