Skip to content

Instantly share code, notes, and snippets.

@cohalz
Created September 8, 2013 02:09
Show Gist options
  • Save cohalz/6481275 to your computer and use it in GitHub Desktop.
Save cohalz/6481275 to your computer and use it in GitHub Desktop.
object Main {
def main(args: Array[String]) = {
val n = readLine().toInt
val c = readLine()
val num = Array(0,0,0,0)
c collect {
case s:Char => num(s.asDigit-1) += 1
}
println(num.max +" "+ num.min)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment