結果
問題 | No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用) |
ユーザー | rutilicus |
提出日時 | 2020-08-30 20:45:19 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 465 ms / 3,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 11,263 ms |
コンパイル使用メモリ | 426,004 KB |
実行使用メモリ | 81,156 KB |
最終ジャッジ日時 | 2024-04-27 13:14:36 |
合計ジャッジ時間 | 19,703 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 302 ms
56,816 KB |
testcase_01 | AC | 299 ms
56,732 KB |
testcase_02 | AC | 301 ms
56,756 KB |
testcase_03 | AC | 313 ms
56,816 KB |
testcase_04 | AC | 311 ms
56,800 KB |
testcase_05 | AC | 312 ms
56,876 KB |
testcase_06 | AC | 345 ms
56,872 KB |
testcase_07 | AC | 419 ms
58,844 KB |
testcase_08 | AC | 434 ms
60,768 KB |
testcase_09 | AC | 448 ms
62,752 KB |
testcase_10 | AC | 459 ms
76,952 KB |
testcase_11 | AC | 465 ms
77,008 KB |
testcase_12 | AC | 464 ms
76,952 KB |
testcase_13 | AC | 461 ms
79,264 KB |
testcase_14 | AC | 457 ms
79,232 KB |
testcase_15 | AC | 458 ms
79,064 KB |
testcase_16 | AC | 463 ms
81,156 KB |
testcase_17 | AC | 308 ms
56,828 KB |
testcase_18 | AC | 305 ms
56,832 KB |
コンパイルメッセージ
Main.kt:11: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(ans) ^
ソースコード
fun main() { val builder = StringBuilder() val n = readInputLine().toInt() var ans = 0L repeat(n) { ans += readInputLine().toLong() } builder.appendln(ans) print(builder.toString()) } fun readInputLine(): String { return readLine()!! }