結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー kuramubonnkuramubonn
提出日時 2023-02-01 16:23:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 888 ms / 3,000 ms
コード長 261 bytes
コンパイル時間 1,935 ms
コンパイル使用メモリ 72,732 KB
実行使用メモリ 65,048 KB
最終ジャッジ日時 2023-09-14 03:27:52
合計ジャッジ時間 12,186 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,624 KB
testcase_01 AC 124 ms
55,756 KB
testcase_02 AC 123 ms
55,956 KB
testcase_03 AC 122 ms
55,996 KB
testcase_04 AC 126 ms
55,804 KB
testcase_05 AC 136 ms
55,788 KB
testcase_06 AC 190 ms
56,220 KB
testcase_07 AC 274 ms
60,052 KB
testcase_08 AC 488 ms
60,692 KB
testcase_09 AC 598 ms
60,932 KB
testcase_10 AC 829 ms
64,672 KB
testcase_11 AC 843 ms
62,552 KB
testcase_12 AC 851 ms
64,412 KB
testcase_13 AC 876 ms
64,652 KB
testcase_14 AC 859 ms
64,372 KB
testcase_15 AC 847 ms
64,944 KB
testcase_16 AC 888 ms
65,048 KB
testcase_17 AC 122 ms
55,812 KB
testcase_18 AC 124 ms
55,744 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