結果

問題 No.892 タピオカ
ユーザー minokasagominokasago
提出日時 2019-10-31 17:38:15
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 296 ms / 1,000 ms
コード長 232 bytes
コンパイル時間 13,522 ms
コンパイル使用メモリ 413,836 KB
実行使用メモリ 52,944 KB
最終ジャッジ日時 2023-10-13 00:06:47
合計ジャッジ時間 15,788 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 296 ms
52,732 KB
testcase_01 AC 294 ms
52,908 KB
testcase_02 AC 292 ms
52,944 KB
testcase_03 AC 292 ms
52,840 KB
testcase_04 AC 289 ms
52,900 KB
testcase_05 AC 291 ms
52,764 KB
testcase_06 AC 290 ms
52,824 KB
testcase_07 AC 291 ms
52,920 KB
testcase_08 AC 293 ms
52,928 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>)
         ^
Main.kt:5:31: warning: parameter 'v' is never used, could be renamed to _
    if (ab.filterIndexed { i, v -> i%2==0 }.sum() % 2 == 0) {
                              ^

ソースコード

diff #

fun main(args: Array<String>)
{
    val ab: List<Int> = readLine()!!.split(" ").map { it.toInt() }
    
    if (ab.filterIndexed { i, v -> i%2==0 }.sum() % 2 == 0) {
        println(":-)")
    } else {
        println(":-(")
    }
}
0