結果

問題 No.29 パワーアップ
ユーザー バカらっくバカらっく
提出日時 2019-09-06 08:33:46
言語 Kotlin
(1.9.23)
結果
RE  
実行時間 -
コード長 309 bytes
コンパイル時間 13,587 ms
コンパイル使用メモリ 421,440 KB
実行使用メモリ 55,136 KB
最終ジャッジ日時 2023-09-05 17:53:47
合計ジャッジ時間 22,787 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 304 ms
53,140 KB
testcase_02 AC 303 ms
52,976 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 306 ms
53,512 KB
testcase_21 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import java.util.*

fun main(args: Array<String>) {
    val count = readLine()!!.toInt()
    val items = Array<Int>(10, {0})
    (1..count).forEach {
        readLine()!!.split(" ").map { items[it.toInt()]++ }
    }
    val ans = items.map { it / 2 }.sum() + items.map { it % 2 }.sum() / 4
    println(ans)
}
0