結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー papipenpapipen
提出日時 2017-03-23 20:53:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 778 ms / 3,000 ms
コード長 318 bytes
コンパイル時間 4,106 ms
コンパイル使用メモリ 72,568 KB
実行使用メモリ 68,908 KB
最終ジャッジ日時 2023-08-26 16:59:39
合計ジャッジ時間 11,544 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
55,996 KB
testcase_01 AC 112 ms
56,028 KB
testcase_02 AC 104 ms
56,144 KB
testcase_03 AC 107 ms
55,820 KB
testcase_04 AC 109 ms
56,184 KB
testcase_05 AC 119 ms
55,976 KB
testcase_06 AC 166 ms
56,496 KB
testcase_07 AC 247 ms
60,396 KB
testcase_08 AC 420 ms
60,648 KB
testcase_09 AC 514 ms
60,408 KB
testcase_10 AC 740 ms
66,476 KB
testcase_11 AC 742 ms
66,840 KB
testcase_12 AC 728 ms
66,432 KB
testcase_13 AC 778 ms
66,452 KB
testcase_14 AC 723 ms
68,372 KB
testcase_15 AC 732 ms
68,332 KB
testcase_16 AC 769 ms
68,908 KB
testcase_17 AC 111 ms
55,772 KB
testcase_18 AC 106 ms
56,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class test{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    long b[] = new long[a];
    long sum = 0;

    for(int i = 0; i < a; i++){
      b[i] = scan.nextLong();
      sum += b[i];
    }
  System.out.println(sum);
  }
}
0