結果

問題 No.191 供託金
ユーザー javyjavy
提出日時 2015-12-01 09:28:30
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 334 ms / 5,000 ms
コード長 1,326 bytes
コンパイル時間 12,458 ms
コンパイル使用メモリ 437,352 KB
実行使用メモリ 57,144 KB
最終ジャッジ日時 2024-04-30 11:33:02
合計ジャッジ時間 22,214 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 321 ms
56,944 KB
testcase_01 AC 318 ms
56,828 KB
testcase_02 AC 323 ms
56,992 KB
testcase_03 AC 318 ms
56,848 KB
testcase_04 AC 325 ms
57,144 KB
testcase_05 AC 327 ms
57,124 KB
testcase_06 AC 327 ms
57,084 KB
testcase_07 AC 328 ms
57,012 KB
testcase_08 AC 321 ms
57,076 KB
testcase_09 AC 321 ms
57,140 KB
testcase_10 AC 319 ms
57,116 KB
testcase_11 AC 316 ms
57,140 KB
testcase_12 AC 323 ms
56,844 KB
testcase_13 AC 325 ms
57,108 KB
testcase_14 AC 327 ms
57,008 KB
testcase_15 AC 330 ms
56,996 KB
testcase_16 AC 326 ms
57,080 KB
testcase_17 AC 334 ms
57,000 KB
testcase_18 AC 329 ms
56,828 KB
testcase_19 AC 329 ms
57,104 KB
testcase_20 AC 331 ms
57,092 KB
testcase_21 AC 332 ms
57,144 KB
testcase_22 AC 330 ms
57,088 KB
testcase_23 AC 333 ms
56,992 KB
testcase_24 AC 331 ms
56,968 KB
testcase_25 AC 325 ms
56,948 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^
Main.kt:50:9: warning: variable 'num' is never used
    val num = readLineInt()
        ^

ソースコード

diff #

package Yukicoder

/**
 * Created by hichikawa on 2015/11/12.
 */
fun main(args: Array<String>) {
    fun readLineLongArray(): List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }

    fun readLineLong(): Long {
        val str = readLine() as String
        return str.toLong()
    }

    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }

    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toInt() }
        return ret
    }

    fun readLineDoubleArray(): List<Double> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toDouble() }
        return ret
    }

    fun readLineDouble() : Double {
        val str = readLine() as String
        return str.toDouble()
    }


//    fun readLineStringArray(): List<String> {
//        val str = readLine() as String
//        val arrStr = str.split(" ")
//        return arrStr
//    }

    val num = readLineInt()
    val arrMoney = readLineIntArray()
    val kyotaku = arrMoney.sum() / 10
    val ans = arrMoney.filter { it <= kyotaku }.size * 30
    println(ans)
}
0