結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー papipenpapipen
提出日時 2017-03-19 22:01:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 925 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 2,108 ms
コンパイル使用メモリ 73,440 KB
実行使用メモリ 72,732 KB
最終ジャッジ日時 2023-09-18 07:31:50
合計ジャッジ時間 12,205 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,980 KB
testcase_01 AC 125 ms
55,800 KB
testcase_02 AC 127 ms
55,792 KB
testcase_03 AC 126 ms
55,840 KB
testcase_04 AC 128 ms
55,912 KB
testcase_05 AC 141 ms
55,512 KB
testcase_06 AC 198 ms
55,712 KB
testcase_07 AC 288 ms
60,032 KB
testcase_08 AC 481 ms
60,556 KB
testcase_09 AC 537 ms
60,368 KB
testcase_10 AC 844 ms
67,532 KB
testcase_11 AC 899 ms
66,672 KB
testcase_12 AC 859 ms
67,348 KB
testcase_13 AC 925 ms
72,732 KB
testcase_14 AC 812 ms
69,460 KB
testcase_15 AC 854 ms
68,584 KB
testcase_16 AC 910 ms
70,020 KB
testcase_17 AC 125 ms
55,792 KB
testcase_18 AC 125 ms
55,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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