結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー oldlevinoldlevin
提出日時 2020-02-20 06:19:37
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 418 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 102,368 KB
実行使用メモリ 49,152 KB
最終ジャッジ日時 2023-07-30 04:20:41
合計ジャッジ時間 5,561 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
21,636 KB
testcase_01 AC 61 ms
23,696 KB
testcase_02 AC 61 ms
21,796 KB
testcase_03 AC 61 ms
23,696 KB
testcase_04 AC 61 ms
21,676 KB
testcase_05 AC 61 ms
19,748 KB
testcase_06 AC 69 ms
23,732 KB
testcase_07 AC 72 ms
22,688 KB
testcase_08 AC 91 ms
29,972 KB
testcase_09 AC 97 ms
28,796 KB
testcase_10 AC 173 ms
48,936 KB
testcase_11 AC 174 ms
47,404 KB
testcase_12 AC 177 ms
45,728 KB
testcase_13 AC 180 ms
48,220 KB
testcase_14 AC 184 ms
46,952 KB
testcase_15 AC 185 ms
49,024 KB
testcase_16 AC 197 ms
49,152 KB
testcase_17 AC 61 ms
21,652 KB
testcase_18 AC 60 ms
23,712 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(){
        var n = long.Parse(ReadLine().Trim()); 
        long[] s = new long[n];
        s = ReadLine().Trim().Split(' ').Select(long.Parse).ToArray();
        long sum = 0;
        for(int i=0;i<n;i++){
            sum += s[i];
        }
        WriteLine(sum);
    }
}
0