문제
2480 주사위 세개
답
kotlin code
import java.util.*
fun main(args: Array<String>) = with(Scanner(System.`in`)) {
q2480(nextInt(), nextInt(), nextInt());
}
fun q2480(one: Int, two: Int, three: Int): Unit {
var numMap = listOf(one, two, three).groupingBy { it }.eachCount();
if(numMap.count() == 1) println(10000 + (numMap.keys.first() * 1000))
else if(numMap.count() == 2) println(1000 + (numMap.filter { num -> num.value == 2 }.keys.first() * 100))
else println(numMap.keys.maxOf { it } * 100)
}