結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Haleakala
提出日時 2018-02-18 15:35:19
言語 Java
(openjdk 23)
結果
AC  
実行時間 944 ms / 3,000 ms
コード長 389 bytes
コンパイル時間 3,492 ms
コンパイル使用メモリ 77,328 KB
実行使用メモリ 54,696 KB
最終ジャッジ日時 2024-06-24 12:46:13
合計ジャッジ時間 14,139 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No480 {
	public static void main(String str[]) {
        Scanner sc = new Scanner(System.in);

        int inputNum = Integer.valueOf(sc.nextLine());

        long sum = 0;
        for(int i=0; i<inputNum; i++) {

        	sum += Long.valueOf(sc.nextLine());
        }

        // 標準出力に書き出す。
        System.out.println(sum);
	}
}
0