結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー QED0302QED0302
提出日時 2018-05-10 15:08:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 984 ms / 3,000 ms
コード長 424 bytes
コンパイル時間 3,870 ms
コンパイル使用メモリ 72,436 KB
実行使用メモリ 67,388 KB
最終ジャッジ日時 2023-09-10 11:36:52
合計ジャッジ時間 13,519 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,948 KB
testcase_01 AC 123 ms
55,852 KB
testcase_02 AC 121 ms
55,808 KB
testcase_03 AC 121 ms
55,756 KB
testcase_04 AC 122 ms
55,724 KB
testcase_05 AC 139 ms
55,456 KB
testcase_06 AC 178 ms
58,000 KB
testcase_07 AC 272 ms
59,404 KB
testcase_08 AC 468 ms
61,640 KB
testcase_09 AC 637 ms
64,960 KB
testcase_10 AC 984 ms
67,232 KB
testcase_11 AC 909 ms
67,028 KB
testcase_12 AC 927 ms
66,732 KB
testcase_13 AC 926 ms
67,292 KB
testcase_14 AC 894 ms
67,388 KB
testcase_15 AC 932 ms
67,176 KB
testcase_16 AC 932 ms
66,800 KB
testcase_17 AC 122 ms
55,656 KB
testcase_18 AC 121 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;

public class enter{
	public static void main(String[] args){
		
			Long totalnum = 0L; 

			Scanner sc = new Scanner(System.in);
			int N = Integer.parseInt(sc.nextLine());
			for(int i = 0;i<N;i++){				
				String str = sc.nextLine();
				Long num = Long.parseLong(str);
				totalnum += num;
			}
			System.out.println(totalnum);
		
	}
}
0