Submission #3457478
Source Code Expand
fun main(args: Array<String>) { a71(readLineList()) } fun readLineList(): Array<String> { val lineList = mutableListOf<String>() while (true) { val line = readLine() if (line.isNullOrBlank()) { break } else { lineList.add(line!!) } } return lineList.toTypedArray() } fun a71(args: Array<String>) { if (args.size != 1) { throw IllegalArgumentException() } val (current, first, second) = args[0].split(" ").map { it.toInt() } fun abs(a: Int, b: Int): Int = if (a - b >= 0) a - b else b - a println(if (abs(current, first) < abs(current, second)) "A" else "B") }
Submission Info
Submission Time | |
---|---|
Task | A - Meal Delivery |
User | choruru |
Language | Kotlin (1.0.0) |
Score | 100 |
Code Size | 689 Byte |
Status | AC |
Exec Time | 236 ms |
Memory | 36296 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt |
All | sample1.txt, sample2.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, sample1.txt, sample2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | AC | 235 ms | 34284 KB |
2.txt | AC | 234 ms | 36284 KB |
3.txt | AC | 235 ms | 36260 KB |
4.txt | AC | 234 ms | 36256 KB |
5.txt | AC | 235 ms | 36212 KB |
6.txt | AC | 235 ms | 36296 KB |
sample1.txt | AC | 236 ms | 34340 KB |
sample2.txt | AC | 234 ms | 36132 KB |