結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Hoboteru4484Hoboteru4484
提出日時 2019-11-30 22:26:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 882 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 3,090 ms
コンパイル使用メモリ 71,704 KB
実行使用メモリ 65,608 KB
最終ジャッジ日時 2023-08-13 09:48:45
合計ジャッジ時間 12,956 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,024 KB
testcase_01 AC 123 ms
53,964 KB
testcase_02 AC 122 ms
55,744 KB
testcase_03 AC 123 ms
56,108 KB
testcase_04 AC 125 ms
56,052 KB
testcase_05 AC 137 ms
55,900 KB
testcase_06 AC 192 ms
56,168 KB
testcase_07 AC 280 ms
60,144 KB
testcase_08 AC 486 ms
60,520 KB
testcase_09 AC 533 ms
60,540 KB
testcase_10 AC 826 ms
64,844 KB
testcase_11 AC 804 ms
62,588 KB
testcase_12 AC 811 ms
65,112 KB
testcase_13 AC 834 ms
65,268 KB
testcase_14 AC 854 ms
65,284 KB
testcase_15 AC 824 ms
64,864 KB
testcase_16 AC 882 ms
65,608 KB
testcase_17 AC 123 ms
55,908 KB
testcase_18 AC 122 ms
55,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Answer {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int dataCount = sc.nextInt();
    long sum = 0;

    for(int i = 0;i < dataCount;i++){
      sum += sc.nextLong();
    }
    
    sc.close();
    System.out.println(sum);
  }
}
0