package Yukicoder /** * Created by hichikawa on 2015/11/11. */ fun main(args: Array) { fun readLineLongArray() : List { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toLong() } return ret } fun readLineLong() : Long { val str = readLine() as String return str.toLong() } readLine() val inputArrLong = readLineLongArray() as List var countKame = 0 var countTsuru = 0 for (lo in inputArrLong) { if (lo == 4.toLong()) { countKame++ } else { countTsuru++ } } println(countKame.toString() + " " + countTsuru.toString()) }