Twelve by

import Data.Char (intToDigit, digitToInt, isHexDigit, toUpper)
import Numeric (showIntAtBase, readInt)

toBase :: Int -> Int -> String
toBase num base =
  showIntAtBase base intToDigit num ""

fromBase :: String -> Int -> Int
fromBase str base =
  fst $head $readInt base isHexDigit digitToInt str

f a=map toUpper$toBase (sum$map(\x->fromBase x 12)a) 12

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)


return to the top page