結果
問題 | No.564 背の順 |
ユーザー | ichibanshibori |
提出日時 | 2018-05-03 19:13:23 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 308 ms / 2,000 ms |
コード長 | 381 bytes |
コンパイル時間 | 15,057 ms |
コンパイル使用メモリ | 416,400 KB |
実行使用メモリ | 54,744 KB |
最終ジャッジ日時 | 2023-08-12 23:35:55 |
合計ジャッジ時間 | 18,055 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 299 ms
54,744 KB |
testcase_01 | AC | 298 ms
52,660 KB |
testcase_02 | AC | 305 ms
53,192 KB |
testcase_03 | AC | 300 ms
52,940 KB |
testcase_04 | AC | 300 ms
52,812 KB |
testcase_05 | AC | 303 ms
52,900 KB |
testcase_06 | AC | 308 ms
52,844 KB |
testcase_07 | AC | 302 ms
53,448 KB |
testcase_08 | AC | 304 ms
52,812 KB |
testcase_09 | AC | 302 ms
52,808 KB |
testcase_10 | AC | 302 ms
52,804 KB |
testcase_11 | AC | 300 ms
52,788 KB |
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used fun main(args : Array<String>) { ^
ソースコード
fun main(args : Array<String>) { val hnLst = (readLine() ?: "").run { split(" ") }.map { it.toInt() } val hLst = (1..(hnLst[1] - 1)).map { readLine() ?: "" }.map { it.toInt() } hLst.filter { it > hnLst[0] } .count() .let { it + 1 } .let { when (it % 10) { 1 -> "${it}st" 2 -> "${it}nd" 3 -> "${it}rd" else -> "${it}th" } } .let { println(it) } }