結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー KahoMatsumotoKahoMatsumoto
提出日時 2017-05-23 19:04:12
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 370 bytes
コンパイル時間 3,396 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 74,620 KB
最終ジャッジ日時 2023-10-19 15:38:21
合計ジャッジ時間 12,035 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,396 KB
testcase_01 AC 132 ms
57,396 KB
testcase_02 AC 119 ms
56,156 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 525 ms
62,340 KB
testcase_10 AC 798 ms
74,356 KB
testcase_11 AC 814 ms
74,544 KB
testcase_12 AC 867 ms
74,504 KB
testcase_13 AC 827 ms
74,500 KB
testcase_14 AC 863 ms
74,620 KB
testcase_15 AC 889 ms
74,348 KB
testcase_16 AC 892 ms
74,440 KB
testcase_17 AC 126 ms
57,540 KB
testcase_18 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No9008 {
  public static void main(String[] args) {
    int n;
    Scanner sc = new Scanner(System.in);
    n = sc.nextInt();
    int[] l = new int[n];
    long sum = 0;
    for (int i = 0; i < n; i++) {
      l[i] = sc.nextInt();
    }
    for (int i = 0; i < n; i++) {
      sum += l[i];
    }
    System.out.println(sum);
  }
}
0