結果

問題 No.182 新規性の虜
ユーザー Haruki KitagawaHaruki Kitagawa
提出日時 2019-06-17 18:13:47
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 570 ms / 5,000 ms
コード長 287 bytes
コンパイル時間 9,643 ms
コンパイル使用メモリ 433,716 KB
実行使用メモリ 99,416 KB
最終ジャッジ日時 2024-04-30 21:02:41
合計ジャッジ時間 22,512 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 272 ms
57,080 KB
testcase_01 AC 269 ms
57,084 KB
testcase_02 AC 276 ms
57,044 KB
testcase_03 AC 271 ms
56,932 KB
testcase_04 AC 274 ms
57,016 KB
testcase_05 AC 267 ms
57,208 KB
testcase_06 AC 285 ms
57,104 KB
testcase_07 AC 276 ms
57,144 KB
testcase_08 AC 511 ms
76,068 KB
testcase_09 AC 570 ms
84,360 KB
testcase_10 AC 551 ms
82,236 KB
testcase_11 AC 509 ms
78,212 KB
testcase_12 AC 452 ms
67,940 KB
testcase_13 AC 271 ms
57,036 KB
testcase_14 AC 273 ms
57,120 KB
testcase_15 AC 270 ms
56,940 KB
testcase_16 AC 278 ms
57,128 KB
testcase_17 AC 284 ms
57,032 KB
testcase_18 AC 468 ms
71,992 KB
testcase_19 AC 488 ms
67,764 KB
testcase_20 AC 451 ms
65,608 KB
testcase_21 AC 521 ms
73,964 KB
testcase_22 AC 455 ms
65,616 KB
testcase_23 AC 270 ms
57,060 KB
testcase_24 AC 543 ms
99,416 KB
testcase_25 AC 464 ms
67,964 KB
testcase_26 AC 423 ms
63,780 KB
testcase_27 AC 281 ms
57,112 KB
evil01.txt AC 552 ms
97,340 KB
evil02.txt AC 553 ms
97,368 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^
Main.kt:2:9: warning: variable 'n' is never used
    val n = readLine()!!.toInt()
        ^

ソースコード

diff #

fun main(args: Array<String>){
    val n = readLine()!!.toInt()
    val aList = readLine()!!.split(" ").map{ it.toLong() }
    val map = mutableMapOf<Long, Int>().withDefault{ 0 }
    for (a in aList){
        map[a] = (map[a]?:0) + 1
    }
    println(map.filter{ it.value == 1}.size)
}
0