結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー YukiYuki
提出日時 2020-12-19 22:11:01
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 939 ms
コンパイル使用メモリ 109,916 KB
実行使用メモリ 54,084 KB
最終ジャッジ日時 2023-10-21 09:39:29
合計ジャッジ時間 3,722 ms
ジャッジサーバーID
(参考情報)
judge9 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
25,348 KB
testcase_01 AC 24 ms
25,348 KB
testcase_02 AC 26 ms
25,348 KB
testcase_03 AC 27 ms
25,348 KB
testcase_04 AC 26 ms
25,348 KB
testcase_05 AC 26 ms
25,348 KB
testcase_06 AC 30 ms
25,664 KB
testcase_07 AC 34 ms
26,584 KB
testcase_08 AC 47 ms
30,924 KB
testcase_09 AC 54 ms
31,376 KB
testcase_10 AC 127 ms
51,436 KB
testcase_11 AC 125 ms
52,012 KB
testcase_12 AC 126 ms
52,464 KB
testcase_13 AC 130 ms
53,048 KB
testcase_14 AC 139 ms
53,496 KB
testcase_15 AC 134 ms
54,084 KB
testcase_16 AC 151 ms
52,704 KB
testcase_17 AC 24 ms
25,348 KB
testcase_18 AC 27 ms
25,348 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;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = Int32.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split(' ').Select(s => Int64.Parse(s)).ToArray();

            Int64 sum = 0;
            for (Int32 i = 0; i < n; i++)
            {
                sum += a[i];
            }

            Console.WriteLine(sum);
        }
    }
}
0