結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー juugayajuugaya
提出日時 2020-06-12 21:48:13
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 317 bytes
コンパイル時間 1,718 ms
コンパイル使用メモリ 70,876 KB
実行使用メモリ 68,360 KB
最終ジャッジ日時 2023-09-06 10:10:56
合計ジャッジ時間 9,694 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
55,752 KB
testcase_01 AC 106 ms
54,172 KB
testcase_02 AC 107 ms
55,848 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 700 ms
68,360 KB
testcase_11 AC 719 ms
66,724 KB
testcase_12 AC 768 ms
67,252 KB
testcase_13 AC 747 ms
67,344 KB
testcase_14 AC 748 ms
67,332 KB
testcase_15 AC 731 ms
67,112 KB
testcase_16 AC 823 ms
67,272 KB
testcase_17 AC 107 ms
55,780 KB
testcase_18 RE -
権限があれば一括ダウンロードができます

ソースコード

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 +=Integer.parseInt(l);
}
System.out.println(sum); 
}}
0