結果

問題 No.99 ジャンピング駒
ユーザー バカらっくバカらっく
提出日時 2019-09-29 18:07:19
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 524 ms / 5,000 ms
コード長 239 bytes
コンパイル時間 12,992 ms
コンパイル使用メモリ 431,104 KB
実行使用メモリ 71,928 KB
最終ジャッジ日時 2024-04-14 07:18:24
合計ジャッジ時間 17,345 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 523 ms
71,840 KB
testcase_01 AC 523 ms
71,860 KB
testcase_02 AC 517 ms
71,928 KB
testcase_03 AC 524 ms
71,828 KB
testcase_04 AC 519 ms
71,672 KB
testcase_05 AC 519 ms
71,636 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 komaList = readLine()!!.split(" ").map { it.toLong() }
    val ans = Math.abs(komaList.count { it % 2 == 0L } - komaList.count{it % 2 != 0L})
    println(ans)
}
0