結果
問題 |
No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
![]() |
提出日時 | 2020-08-30 20:45:19 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 420 ms / 3,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 10,759 ms |
コンパイル使用メモリ | 431,984 KB |
実行使用メモリ | 81,152 KB |
最終ジャッジ日時 | 2024-11-15 15:23:08 |
合計ジャッジ時間 | 17,666 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
コンパイルメッセージ
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()!! }