package main import ( "fmt" ) func main() { var N int fmt.Scanf("%d", &N) coins := []int{64, 16, 4, 1} res := 0 N = 1024 - N for _, v := range coins { res += N/v N %= v } fmt.Print(res) }
相当优雅
相当优雅