結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー 3gin303gin30
提出日時 2020-02-19 01:43:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 903 ms
コンパイル使用メモリ 106,096 KB
実行使用メモリ 45,952 KB
最終ジャッジ日時 2024-04-16 04:22:08
合計ジャッジ時間 3,468 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
17,920 KB
testcase_01 AC 24 ms
17,920 KB
testcase_02 AC 23 ms
17,920 KB
testcase_03 AC 24 ms
17,792 KB
testcase_04 AC 25 ms
18,048 KB
testcase_05 AC 24 ms
17,792 KB
testcase_06 AC 28 ms
18,560 KB
testcase_07 AC 33 ms
19,840 KB
testcase_08 AC 53 ms
24,064 KB
testcase_09 AC 59 ms
24,576 KB
testcase_10 AC 131 ms
40,320 KB
testcase_11 AC 130 ms
40,448 KB
testcase_12 AC 133 ms
40,448 KB
testcase_13 AC 134 ms
40,704 KB
testcase_14 AC 137 ms
41,216 KB
testcase_15 AC 139 ms
41,216 KB
testcase_16 AC 163 ms
45,952 KB
testcase_17 AC 24 ms
18,176 KB
testcase_18 AC 24 ms
18,048 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{

    static void Main()
    {

        long n = long.Parse(Console.ReadLine());
        string s = Console.ReadLine();

        string[] strs = s.Split(" ");

        long sum = 0;
        foreach (string str in strs)
        {
            sum += long.Parse(str);
        }

        Console.WriteLine("{0}", sum);

        
    }
}
0