結果

問題 No.785 色食い虫
ユーザー 💕💖💞💕💖💞
提出日時 2019-05-10 17:47:50
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 332 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 12,153 ms
コンパイル使用メモリ 411,768 KB
実行使用メモリ 58,940 KB
最終ジャッジ日時 2023-08-13 02:02:59
合計ジャッジ時間 24,284 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 320 ms
56,804 KB
testcase_01 AC 317 ms
57,004 KB
testcase_02 AC 320 ms
56,892 KB
testcase_03 AC 319 ms
57,024 KB
testcase_04 AC 324 ms
56,720 KB
testcase_05 AC 323 ms
57,084 KB
testcase_06 AC 326 ms
56,712 KB
testcase_07 AC 326 ms
56,744 KB
testcase_08 AC 323 ms
56,688 KB
testcase_09 AC 320 ms
56,792 KB
testcase_10 AC 321 ms
56,852 KB
testcase_11 AC 323 ms
58,940 KB
testcase_12 AC 323 ms
56,800 KB
testcase_13 AC 325 ms
57,052 KB
testcase_14 AC 323 ms
56,692 KB
testcase_15 AC 318 ms
57,060 KB
testcase_16 AC 319 ms
56,820 KB
testcase_17 AC 322 ms
56,584 KB
testcase_18 AC 322 ms
56,724 KB
testcase_19 AC 323 ms
56,732 KB
testcase_20 AC 322 ms
56,696 KB
testcase_21 AC 326 ms
56,888 KB
testcase_22 AC 322 ms
56,728 KB
testcase_23 AC 328 ms
56,812 KB
testcase_24 AC 332 ms
56,688 KB
testcase_25 AC 327 ms
56,792 KB
testcase_26 AC 328 ms
56,732 KB
testcase_27 AC 330 ms
56,696 KB
testcase_28 AC 321 ms
56,748 KB
testcase_29 AC 322 ms
56,672 KB
testcase_30 AC 289 ms
54,500 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^
Main.kt:6:39: warning: unnecessary non-null assertion (!!) on a non-null receiver of type String
            val pat = (default - input!!.split(",").toSet()).size
                                      ^

ソースコード

diff #

fun main(args:Array<String>) {
    (1..3).map {
        val input = readLine()!!
        if( input != "NONE") {
            val default = listOf("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F").toSet()
            val pat = (default - input!!.split(",").toSet()).size
            pat*pat
        } else {
            256
        }
    }.reduce { effect, it ->
        effect * it
    }.let { println(it) }
}
0