結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー LeonardoneLeonardone
提出日時 2016-09-08 19:25:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 201 ms / 3,000 ms
コード長 473 bytes
コンパイル時間 4,438 ms
コンパイル使用メモリ 71,500 KB
実行使用メモリ 55,516 KB
最終ジャッジ日時 2023-08-26 16:44:24
合計ジャッジ時間 6,684 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,156 KB
testcase_01 AC 43 ms
49,228 KB
testcase_02 AC 42 ms
49,156 KB
testcase_03 AC 42 ms
49,160 KB
testcase_04 AC 43 ms
49,000 KB
testcase_05 AC 45 ms
49,096 KB
testcase_06 AC 58 ms
50,188 KB
testcase_07 AC 97 ms
52,724 KB
testcase_08 AC 139 ms
54,680 KB
testcase_09 AC 151 ms
54,352 KB
testcase_10 AC 184 ms
55,244 KB
testcase_11 AC 196 ms
55,032 KB
testcase_12 AC 197 ms
55,220 KB
testcase_13 AC 201 ms
55,084 KB
testcase_14 AC 186 ms
54,512 KB
testcase_15 AC 200 ms
55,516 KB
testcase_16 AC 193 ms
54,636 KB
testcase_17 AC 41 ms
49,072 KB
testcase_18 AC 43 ms
49,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.lang.*;
import java.util.*;

public class Solve
{
    public static void main(String[] args) throws Exception
    {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        
        int n = Integer.parseInt(in.readLine());
        long sum = 0L;
        
        for (int i = 0; i < n; i++)
        {
            sum += Long.parseLong(in.readLine());
        }
        
        System.out.println(sum);
    }
}
0