• Home
  • About
    • Moon photo

      Moon

      개발자는 자고 싶다.

    • Learn More
    • Twitter
    • Facebook
    • Instagram
    • Github
    • Steam
  • Posts
    • All Posts
    • All Tags
  • Projects

백준 - 10250 ACM 호텔

06 Jun 2022

Reading time ~1 minute

문제

10250 ACM 호텔

screencapture

답

kotlin code

fun main() {
    q10250()
}

fun q10250() {
    val size = readln().toInt()
    val inputs = List(size){ readln().split(" ").map { it.toInt() } }
    for(input in inputs) {
        val height = input[0]
        val width = input[1]
        val orderOfGuests = input[2]
        var n = 0

        for(w in 1..width) {
            for(h in 1..height) {
                if(++n == orderOfGuests) {
                    println((h * 100) + w)
                    break
                }
            }
            if(n >= orderOfGuests) break
        }
    }
}


baekjoonkotlin코틀린백준브론즈수학구현사칙연산 Share Tweet +1