import Foundation

func solution(_ n:Int) -> Int
{
    return "\(n)".compactMap { $0.hexDigitValue }.reduce(0, +)    
}

 

+ Recent posts