結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー LeonardoneLeonardone
提出日時 2016-09-27 17:43:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 319 ms / 2,000 ms
コード長 519 bytes
コンパイル時間 2,853 ms
コンパイル使用メモリ 74,604 KB
実行使用メモリ 76,912 KB
最終ジャッジ日時 2024-05-01 05:44:30
合計ジャッジ時間 6,632 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
36,820 KB
testcase_01 AC 47 ms
36,668 KB
testcase_02 AC 47 ms
37,088 KB
testcase_03 AC 49 ms
36,928 KB
testcase_04 AC 53 ms
36,952 KB
testcase_05 AC 51 ms
37,124 KB
testcase_06 AC 61 ms
37,800 KB
testcase_07 AC 109 ms
41,268 KB
testcase_08 AC 194 ms
45,472 KB
testcase_09 AC 189 ms
49,848 KB
testcase_10 AC 275 ms
67,164 KB
testcase_11 AC 257 ms
67,192 KB
testcase_12 AC 313 ms
74,412 KB
testcase_13 AC 319 ms
75,068 KB
testcase_14 AC 315 ms
75,548 KB
testcase_15 AC 300 ms
75,888 KB
testcase_16 AC 298 ms
76,912 KB
testcase_17 AC 48 ms
37,140 KB
testcase_18 AC 48 ms
36,948 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());
        String[] lines = in.readLine().split(" ");
        long sum = 0L;
        
        for (int i = 0; i < n; i++)
        {
            sum += Long.parseLong(lines[i]);
        }
        
        System.out.println(sum);
    }
}
0