結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー rutilicus
提出日時 2020-08-30 20:42:42
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 568 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 11,782 ms
コンパイル使用メモリ 436,064 KB
実行使用メモリ 107,284 KB
最終ジャッジ日時 2024-11-15 15:22:27
合計ジャッジ時間 21,650 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:5:13: warning: 'appendln(Long): kotlin.text.StringBuilder /* = java.lang.StringBuilder */' is deprecated. Use appendLine instead. Note that the new method always appends the line feed character '\n' regardless of the system line separator.
    builder.appendln(readInputLine().split(" ").sumOf { it.toLong() })
            ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    readInputLine()
    builder.appendln(readInputLine().split(" ").sumOf { it.toLong() })

    print(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
0