You are viewing a single comment's thread. Return to all comments →
In Scala:
def superDigit(n : String, k : Long): Long = n.length match { case 1 if k==1 => n.toLong case _ => superDigit((n.chars().filter(_ != 48).map(_-48).asLongStream().sum()*k).toString, 1) }
Seems like cookies are disabled on this browser, please enable them to open this website
Super Digit
You are viewing a single comment's thread. Return to all comments →
In Scala: