結果

問題 No.99 ジャンピング駒
ユーザー バカらっくバカらっく
提出日時 2019-09-29 18:10:21
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 633 ms / 5,000 ms
コード長 210 bytes
コンパイル時間 13,326 ms
コンパイル使用メモリ 428,284 KB
実行使用メモリ 71,872 KB
最終ジャッジ日時 2024-04-14 07:19:21
合計ジャッジ時間 18,468 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 566 ms
71,792 KB
testcase_01 AC 633 ms
71,772 KB
testcase_02 AC 569 ms
71,744 KB
testcase_03 AC 546 ms
71,756 KB
testcase_04 AC 549 ms
71,752 KB
testcase_05 AC 557 ms
71,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'arr' is never used
fun main(arr:Array<String>) {
         ^
Main.kt:2:9: warning: variable 'komaCount' is never used
    val komaCount = readLine()!!.toInt()
        ^

ソースコード

diff #

fun main(arr:Array<String>) {
    val komaCount = readLine()!!.toInt()
    val ans = readLine()!!.split(" ").map { it.toLong() }.let { Math.abs(it.count() - (it.count { it % 2 == 0L } * 2)) }
    println(ans)
}
0