解题思路:
注意事项:
参考代码:
import java.util.Scanner; public class T1892 { public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()){ String s = in.next(); int value = Integer.parseInt(s,16); System.out.printf("Hex: 0x%s%nDecimal: %d%nOctal: %2$04o%n",s,value); } in.close(); } }
0.0分
0 人评分