题解 | #缩短二进制#

缩短二进制

https://www.nowcoder.com/practice/4ffcc9f206b949ddb057ee0099b34d51

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
       int num =1234;
       System.out.printf("%#o ",num);//%o 没有提醒的八进制即没有0开头
          System.out.printf("%#X",num);//%s没有#,不是0X开头
    }
}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务