题解 | #缩短二进制# Scala版本
缩短二进制
http://www.nowcoder.com/practice/4ffcc9f206b949ddb057ee0099b34d51
object Main { def main(args: Array[String]): Unit = { val num: Int = 1234 println("0%o 0X%x".format(num, num).toUpperCase) } }
缩短二进制
http://www.nowcoder.com/practice/4ffcc9f206b949ddb057ee0099b34d51
object Main { def main(args: Array[String]): Unit = { val num: Int = 1234 println("0%o 0X%x".format(num, num).toUpperCase) } }
相关推荐