結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー ikawaiikawai
提出日時 2023-09-01 14:19:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 789 ms / 3,000 ms
コード長 304 bytes
コンパイル時間 2,156 ms
コンパイル使用メモリ 70,956 KB
実行使用メモリ 64,668 KB
最終ジャッジ日時 2023-09-01 14:19:51
合計ジャッジ時間 11,541 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
55,624 KB
testcase_01 AC 110 ms
55,388 KB
testcase_02 AC 112 ms
55,588 KB
testcase_03 AC 110 ms
55,816 KB
testcase_04 AC 115 ms
55,856 KB
testcase_05 AC 140 ms
55,664 KB
testcase_06 AC 174 ms
56,456 KB
testcase_07 AC 254 ms
60,080 KB
testcase_08 AC 454 ms
60,432 KB
testcase_09 AC 561 ms
60,480 KB
testcase_10 AC 741 ms
64,328 KB
testcase_11 AC 789 ms
64,380 KB
testcase_12 AC 725 ms
64,268 KB
testcase_13 AC 703 ms
64,268 KB
testcase_14 AC 786 ms
64,632 KB
testcase_15 AC 759 ms
64,648 KB
testcase_16 AC 771 ms
64,668 KB
testcase_17 AC 114 ms
56,296 KB
testcase_18 AC 113 ms
55,916 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