結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー 水野嶺水野嶺
提出日時 2020-05-14 13:46:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 758 ms / 2,000 ms
コード長 431 bytes
コンパイル時間 1,731 ms
コンパイル使用メモリ 72,040 KB
実行使用メモリ 65,064 KB
最終ジャッジ日時 2023-10-13 08:04:40
合計ジャッジ時間 10,164 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
55,976 KB
testcase_01 AC 105 ms
56,076 KB
testcase_02 AC 109 ms
53,828 KB
testcase_03 AC 111 ms
56,360 KB
testcase_04 AC 114 ms
55,852 KB
testcase_05 AC 123 ms
55,756 KB
testcase_06 AC 167 ms
56,356 KB
testcase_07 AC 259 ms
59,976 KB
testcase_08 AC 418 ms
60,504 KB
testcase_09 AC 477 ms
60,676 KB
testcase_10 AC 720 ms
64,684 KB
testcase_11 AC 723 ms
64,584 KB
testcase_12 AC 725 ms
65,064 KB
testcase_13 AC 731 ms
64,756 KB
testcase_14 AC 758 ms
64,732 KB
testcase_15 AC 747 ms
64,660 KB
testcase_16 AC 739 ms
64,616 KB
testcase_17 AC 116 ms
55,800 KB
testcase_18 AC 112 ms
55,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Goukei2
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		long sum = 0;
		long m;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		for(int i=1;i<=n;i++){
			m = sc.nextLong();
			sum += m;
		}
		
		System.out.println(sum);
	}
}
0