結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,468 KB
testcase_01 AC 125 ms
55,768 KB
testcase_02 AC 124 ms
55,616 KB
testcase_03 AC 124 ms
55,992 KB
testcase_04 AC 127 ms
55,996 KB
testcase_05 AC 139 ms
55,472 KB
testcase_06 AC 187 ms
55,928 KB
testcase_07 AC 286 ms
59,984 KB
testcase_08 AC 465 ms
60,240 KB
testcase_09 AC 524 ms
60,500 KB
testcase_10 AC 832 ms
64,904 KB
testcase_11 AC 849 ms
65,148 KB
testcase_12 AC 846 ms
65,212 KB
testcase_13 AC 835 ms
64,844 KB
testcase_14 AC 844 ms
65,836 KB
testcase_15 AC 855 ms
65,092 KB
testcase_16 AC 871 ms
66,592 KB
testcase_17 AC 124 ms
55,820 KB
testcase_18 AC 125 ms
55,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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