백준 - 2525 오븐 시계
문제
2525 오븐 시계
답
kotlin code
1
2
3
4
5
6
7
8
9
10
11
import java.util.*
fun main(args: Array<String>) = with(Scanner(System.`in`)) {
q2525(nextInt(), nextInt(), nextInt());
}
fun q2525(hour: Int, min: Int, remainMin: Int): Unit {
var totalMin = hour * 60 + min + remainMin;
println(((totalMin / 60) % 24).toString() + " " + (totalMin % 60).toString())
}
This post is licensed under CC BY 4.0 by the author.