結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー d07ki3bq1uz
提出日時 2019-09-27 22:54:59
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 1,925 ms
コンパイル使用メモリ 73,988 KB
実行使用メモリ 74,448 KB
最終ジャッジ日時 2024-09-25 00:50:10
合計ジャッジ時間 21,953 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 8 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
    public static void main (String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int c = sc.nextInt();
        long l = 0;
        
        for(int i = 0 ; i < c ; i++){
           long ans = sc.nextLong();
           l += ans; 
            
            System.out.println(l);
            
        }
    }
}
0