package main import ( "fmt" "math" "sort" ) func num2byte(n int) byte { var bits [4]int idx := 3 for n > 0 { bits[idx] = n % 2 n /= 2 idx-- } for i,j :=0,len(bits)-1; i<j; i,j=i+1,j-1 { bits[i], bits[j] = bits[j], bits[i] } va...