結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー ldsybldsyb
提出日時 2017-04-13 12:16:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 889 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 2,191 ms
コンパイル使用メモリ 71,692 KB
実行使用メモリ 65,916 KB
最終ジャッジ日時 2023-09-25 16:23:21
合計ジャッジ時間 12,056 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,748 KB
testcase_01 AC 124 ms
56,100 KB
testcase_02 AC 127 ms
55,792 KB
testcase_03 AC 126 ms
55,708 KB
testcase_04 AC 126 ms
55,968 KB
testcase_05 AC 139 ms
56,100 KB
testcase_06 AC 194 ms
56,224 KB
testcase_07 AC 290 ms
59,980 KB
testcase_08 AC 490 ms
60,444 KB
testcase_09 AC 549 ms
60,772 KB
testcase_10 AC 849 ms
64,564 KB
testcase_11 AC 865 ms
64,720 KB
testcase_12 AC 850 ms
64,984 KB
testcase_13 AC 870 ms
65,916 KB
testcase_14 AC 851 ms
65,064 KB
testcase_15 AC 833 ms
65,392 KB
testcase_16 AC 889 ms
65,464 KB
testcase_17 AC 125 ms
54,040 KB
testcase_18 AC 125 ms
56,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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