結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー matsumomatsumo
提出日時 2020-11-14 22:43:30
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 562 ms / 2,000 ms
コード長 787 bytes
コンパイル時間 16,666 ms
コンパイル使用メモリ 427,096 KB
実行使用メモリ 83,304 KB
最終ジャッジ日時 2023-09-30 06:38:14
合計ジャッジ時間 22,916 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 293 ms
53,012 KB
testcase_01 AC 292 ms
53,016 KB
testcase_02 AC 289 ms
53,080 KB
testcase_03 AC 292 ms
53,048 KB
testcase_04 AC 291 ms
53,112 KB
testcase_05 AC 298 ms
53,184 KB
testcase_06 AC 305 ms
53,460 KB
testcase_07 AC 419 ms
56,384 KB
testcase_08 AC 427 ms
56,720 KB
testcase_09 AC 458 ms
56,832 KB
testcase_10 AC 551 ms
78,476 KB
testcase_11 AC 542 ms
78,476 KB
testcase_12 AC 544 ms
78,468 KB
testcase_13 AC 545 ms
78,644 KB
testcase_14 AC 551 ms
78,400 KB
testcase_15 AC 548 ms
78,392 KB
testcase_16 AC 562 ms
83,304 KB
testcase_17 AC 289 ms
53,384 KB
testcase_18 AC 286 ms
53,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter

val br = BufferedReader(InputStreamReader(System.`in`))
val out = PrintWriter(System.out)

fun main() {
    br.use {
        out.use {
//        repeat(readInteger()) { solve() }
            solve()
            out.flush()
        }
    }
}

fun solve() {
    readInteger()
    val n = readLongList().sum()
    out.println(n)
}

fun readInteger() = Integer.parseInt(br.readLine())
fun readLong() = java.lang.Long.parseLong(br.readLine())
fun readStringList() = br.readLine()!!.split(' ')
fun readIntegerList() = readStringList().map(Integer::parseInt)
fun readLongList() = readStringList().map(java.lang.Long::parseLong)
fun readDoubleList() = readStringList().map(java.lang.Double::parseDouble)
0