結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Mcpu3Mcpu3
提出日時 2018-04-15 22:41:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 896 ms / 3,000 ms
コード長 280 bytes
コンパイル時間 1,960 ms
コンパイル使用メモリ 70,992 KB
実行使用メモリ 65,180 KB
最終ジャッジ日時 2023-09-09 07:01:05
合計ジャッジ時間 11,970 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,572 KB
testcase_01 AC 128 ms
55,568 KB
testcase_02 AC 128 ms
55,700 KB
testcase_03 AC 128 ms
55,796 KB
testcase_04 AC 128 ms
55,548 KB
testcase_05 AC 141 ms
55,860 KB
testcase_06 AC 195 ms
55,672 KB
testcase_07 AC 281 ms
59,752 KB
testcase_08 AC 500 ms
60,560 KB
testcase_09 AC 608 ms
60,624 KB
testcase_10 AC 852 ms
64,208 KB
testcase_11 AC 876 ms
64,192 KB
testcase_12 AC 880 ms
64,376 KB
testcase_13 AC 857 ms
64,336 KB
testcase_14 AC 843 ms
64,224 KB
testcase_15 AC 896 ms
64,160 KB
testcase_16 AC 893 ms
65,180 KB
testcase_17 AC 125 ms
55,540 KB
testcase_18 AC 126 ms
55,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no9009{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt();
		long a;
		long sum=0;
		for(int i=0;i<n;i++) {
			a=stdIn.nextLong();
			sum+=a;
		}
		System.out.println(sum);
	}
}
0