結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー 水野嶺
提出日時 2020-05-14 13:40:52
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 430 bytes
コンパイル時間 2,191 ms
コンパイル使用メモリ 74,120 KB
実行使用メモリ 57,996 KB
最終ジャッジ日時 2024-09-15 05:08:28
合計ジャッジ時間 12,110 ms
ジャッジサーバーID
(参考情報)
judge2 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 15
権限があれば一括ダウンロードができます

ソースコード

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=0;i<=n;i++){
			m = sc.nextInt();
			sum += m;
		}
		
		System.out.println(sum);
	}
}
0