結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー juugayajuugaya
提出日時 2020-06-12 21:59:22
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 315 bytes
コンパイル時間 5,688 ms
コンパイル使用メモリ 71,852 KB
実行使用メモリ 67,400 KB
最終ジャッジ日時 2023-09-06 10:25:49
合計ジャッジ時間 14,710 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,712 KB
testcase_01 AC 128 ms
56,036 KB
testcase_02 AC 127 ms
55,688 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 881 ms
66,756 KB
testcase_11 AC 874 ms
67,184 KB
testcase_12 AC 877 ms
67,296 KB
testcase_13 AC 901 ms
67,092 KB
testcase_14 AC 911 ms
67,400 KB
testcase_15 AC 939 ms
67,028 KB
testcase_16 AC 942 ms
66,896 KB
testcase_17 AC 125 ms
55,644 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Sample {

public static void main(String args[]) {

Scanner scanner = new Scanner(System.in);

String input = scanner.nextLine();

int n=Integer.parseInt(input);
int sum=0;
for(int i =0;i<n;i++) {
String l =scanner.nextLine();
sum +=Long.parseLong(l);
}
System.out.println(sum); 
}}
0