题解 | #进制转换#

进制转换

https://www.nowcoder.com/practice/8f3df50d2b9043208c5eed283d1d4da6

import Foundation

while let line = readLine() {
    
    if let value = UInt(line.replacingOccurrences(of: "0x", with: ""), radix: 16) {
        print(value)
    }
    
}

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务