KT
kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fun main(args: Array<String>)
{
var hours = readLine()!!.toInt()
var total: Double = 0.0
if (hours >= 24)
{
total = ((hours / 24) * 15).toDouble()
total += (hours % 24) * 0.5
}
else if (hours > 5)
{
total = 5.0
total += (hours - 5) * 0.5
}
else
{
total = hours.toDouble()
}
println(total)
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run