結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Mcpu3Mcpu3
提出日時 2018-06-22 01:04:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 902 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 1,893 ms
コンパイル使用メモリ 71,716 KB
実行使用メモリ 68,480 KB
最終ジャッジ日時 2023-09-13 07:48:01
合計ジャッジ時間 11,735 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,700 KB
testcase_01 AC 124 ms
55,896 KB
testcase_02 AC 125 ms
55,920 KB
testcase_03 AC 124 ms
56,100 KB
testcase_04 AC 124 ms
55,976 KB
testcase_05 AC 137 ms
55,980 KB
testcase_06 AC 189 ms
56,112 KB
testcase_07 AC 292 ms
60,184 KB
testcase_08 AC 489 ms
60,388 KB
testcase_09 AC 537 ms
60,600 KB
testcase_10 AC 857 ms
65,816 KB
testcase_11 AC 893 ms
64,200 KB
testcase_12 AC 882 ms
64,952 KB
testcase_13 AC 869 ms
68,480 KB
testcase_14 AC 831 ms
65,520 KB
testcase_15 AC 853 ms
64,544 KB
testcase_16 AC 902 ms
65,152 KB
testcase_17 AC 121 ms
56,032 KB
testcase_18 AC 122 ms
55,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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