結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー ko kiko ki
提出日時 2020-12-29 22:19:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,054 ms / 2,000 ms
コード長 474 bytes
コンパイル時間 3,421 ms
コンパイル使用メモリ 73,904 KB
実行使用メモリ 58,296 KB
最終ジャッジ日時 2024-04-15 22:42:36
合計ジャッジ時間 13,923 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,528 KB
testcase_01 AC 131 ms
41,460 KB
testcase_02 AC 130 ms
41,260 KB
testcase_03 AC 131 ms
41,380 KB
testcase_04 AC 135 ms
41,836 KB
testcase_05 AC 142 ms
41,400 KB
testcase_06 AC 204 ms
42,868 KB
testcase_07 AC 304 ms
46,572 KB
testcase_08 AC 568 ms
47,752 KB
testcase_09 AC 658 ms
48,244 KB
testcase_10 AC 918 ms
57,804 KB
testcase_11 AC 966 ms
57,960 KB
testcase_12 AC 901 ms
58,036 KB
testcase_13 AC 1,019 ms
58,296 KB
testcase_14 AC 1,004 ms
58,100 KB
testcase_15 AC 1,022 ms
57,964 KB
testcase_16 AC 1,054 ms
57,872 KB
testcase_17 AC 131 ms
41,536 KB
testcase_18 AC 131 ms
41,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder_1 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
    	
    	
        // int 1つ分を読み込む
        int a   = sc.nextInt();
    	long ans = 0;
    	
    	for(int i = 0; i < a; i++) {
    		long b   = sc.nextLong();
    		ans += b;
    		
    	}
    	System.out.println(ans);
    }
}
0