結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー oldlevinoldlevin
提出日時 2020-02-20 06:25:53
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 195 ms / 3,000 ms
コード長 475 bytes
コンパイル時間 1,967 ms
コンパイル使用メモリ 101,280 KB
実行使用メモリ 26,860 KB
最終ジャッジ日時 2023-07-30 04:20:48
合計ジャッジ時間 5,760 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,616 KB
testcase_01 AC 55 ms
22,736 KB
testcase_02 AC 57 ms
22,668 KB
testcase_03 AC 55 ms
22,664 KB
testcase_04 AC 56 ms
20,728 KB
testcase_05 AC 56 ms
20,664 KB
testcase_06 AC 57 ms
20,612 KB
testcase_07 AC 62 ms
20,704 KB
testcase_08 AC 79 ms
22,704 KB
testcase_09 AC 98 ms
26,860 KB
testcase_10 AC 176 ms
26,828 KB
testcase_11 AC 180 ms
24,776 KB
testcase_12 AC 183 ms
26,744 KB
testcase_13 AC 186 ms
24,764 KB
testcase_14 AC 181 ms
24,756 KB
testcase_15 AC 185 ms
22,748 KB
testcase_16 AC 195 ms
22,784 KB
testcase_17 AC 56 ms
20,692 KB
testcase_18 AC 56 ms
22,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;

public class hello{
    public static void Main(){

        //No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
        var n = long.Parse(ReadLine().Trim()); 
        long sum = 0;
        for(int i=0;i<n;i++){
            var k = long.Parse(ReadLine().Trim()); 
            sum += k;
        }
        WriteLine(sum);

    }
}
0