結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー ikawaiikawai
提出日時 2023-09-01 14:17:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 865 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 2,214 ms
コンパイル使用メモリ 71,476 KB
実行使用メモリ 66,744 KB
最終ジャッジ日時 2023-09-01 14:17:41
合計ジャッジ時間 12,162 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,984 KB
testcase_01 AC 120 ms
55,624 KB
testcase_02 AC 126 ms
55,964 KB
testcase_03 AC 129 ms
56,096 KB
testcase_04 AC 129 ms
55,928 KB
testcase_05 AC 131 ms
55,784 KB
testcase_06 AC 183 ms
56,440 KB
testcase_07 AC 268 ms
59,852 KB
testcase_08 AC 503 ms
61,192 KB
testcase_09 AC 540 ms
60,500 KB
testcase_10 AC 835 ms
65,020 KB
testcase_11 AC 799 ms
65,108 KB
testcase_12 AC 816 ms
65,152 KB
testcase_13 AC 843 ms
65,012 KB
testcase_14 AC 807 ms
66,744 KB
testcase_15 AC 842 ms
65,128 KB
testcase_16 AC 865 ms
65,512 KB
testcase_17 AC 120 ms
55,544 KB
testcase_18 AC 120 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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